Skip to content

Commit

Permalink
explicitly check for firmware before starting
Browse files Browse the repository at this point in the history
no ultimate functional change, but makes for a better error message
  • Loading branch information
anttikantee committed Apr 15, 2014
1 parent b0bf7b0 commit be1cab1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion examples/if_iwn/example.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@

#include <rump/rump.h>

/* now, obviously you need the right firmware file for _your_ device */
#define FIRMWARE "./iwlwifi-5000-2.ucode"

int
main()
{
struct stat sb;

if (stat(FIRMWARE, &sb) == -1)
err(1, "need firmware file %s", FIRMWARE);

/* make sure we see dmesg */
setenv("RUMP_VERBOSE", "1", 1);
Expand All @@ -27,7 +34,7 @@ main()
*/
if (rump_pub_etfs_register(
"/libdata/firmware/if_iwn/iwlwifi-5000-2.ucode",
"./iwlwifi-5000-2.ucode", RUMP_ETFS_REG) != 0)
FIRMWARE, RUMP_ETFS_REG) != 0)
err(1, "etfs");

/* make sure old control suckets are not there */
Expand Down

0 comments on commit be1cab1

Please sign in to comment.