Changeset 16727


Ignore:
Timestamp:
2009-07-07T04:22:46+02:00 (9 years ago)
Author:
nbd
Message:

fix wprobe-export

Location:
trunk/package/wprobe/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/wprobe/src/exporter/wprobe-export.c

    r16719 r16727  
    195195    int verbose_level = 0; 
    196196    int opt, i = 10; 
     197        char *err = NULL; 
    197198 
    198199        while ((opt = getopt(argc, argv, "hi:c:p:vstu")) != EOF) { 
     
    253254        } 
    254255 
    255         dev = wprobe_get_auto(ifname); 
     256        dev = wprobe_get_auto(ifname, &err); 
    256257        if (!dev || (list_empty(&dev->global_attr) && list_empty(&dev->link_attr))) { 
    257                 fprintf(stderr, "Cannot connect to wprobe on interface '%s'\n", ifname); 
     258                fprintf(stderr, "Cannot connect to wprobe on interface '%s': %s\n", ifname, (err ? err : "Unknown error")); 
    258259                return -1; 
    259260        } 
  • trunk/package/wprobe/src/user/wprobe-lib.c

    r16719 r16727  
    796796                return wprobe_get_dev(arg); 
    797797#else 
    798                 *err = "Invalid argument"; 
     798                if (err) 
     799                        *err = "Invalid argument"; 
    799800                goto out; 
    800801#endif 
Note: See TracChangeset for help on using the changeset viewer.