diff options
Diffstat (limited to 'vfat-volid/vfat-volid.c')
-rw-r--r-- | vfat-volid/vfat-volid.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/vfat-volid/vfat-volid.c b/vfat-volid/vfat-volid.c index 631438f..0279355 100644 --- a/vfat-volid/vfat-volid.c +++ b/vfat-volid/vfat-volid.c @@ -19,7 +19,7 @@ #ifndef VFAT_IOCTL_GET_VOLUME_ID #warning The IOCTL code has not been defined in public headers... -#define VFAT_IOCTL_GET_VOLUME_ID _IOR('r', 0x12, __u32) +#define VFAT_IOCTL_GET_VOLUME_ID _IOR('r', 0x13, __u32) #endif int main(int argc, char *argv[]) @@ -68,10 +68,8 @@ int main(int argc, char *argv[]) return -h; } - res = ioctl(h, VFAT_IOCTL_GET_VOLUME_ID); - id = res; - - if (res < 0 && !ignore_ioctl_error) { + res = ioctl(h, VFAT_IOCTL_GET_VOLUME_ID, &id); + if (res != 0 && !ignore_ioctl_error) { perror("Error on ioctl"); free(device); return -res; |