diff options
-rw-r--r-- | vfat-volid/test.sh | 2 | ||||
-rw-r--r-- | vfat-volid/vfat-volid.c | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/vfat-volid/test.sh b/vfat-volid/test.sh index 67b115b..2f545ad 100644 --- a/vfat-volid/test.sh +++ b/vfat-volid/test.sh @@ -57,7 +57,7 @@ function do_test() { step=6 echo "Getting volume ID" | tee -a $LOG - v1=`/system/bin/vfat-volid --path $MPT -i` + v1=`/system/bin/vfat-volid --path $MPT` rc=$? if [ $rc -ne 0 ]; then echo "Error when getting volume ID" | tee -a $LOG 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; |