mkfs.c: In function ‘is_ssd’:
mkfs.c:1168:26: warning: ignoring return value of ‘blkid_devno_to_wholedisk’,
declared with attribute warn_unused_result [-Wunused-result]
blkid_devno_to_wholedisk(devno, wholedisk, sizeof(wholedisk), NULL);
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
dev_t devno;
int fd;
char rotational;
dev_t devno;
int fd;
char rotational;
probe = blkid_new_probe_from_filename(file);
if (!probe)
probe = blkid_new_probe_from_filename(file);
if (!probe)
return 0;
/* Get whole disk name (not full path) for this devno */
return 0;
/* Get whole disk name (not full path) for this devno */
- blkid_devno_to_wholedisk(devno, wholedisk, sizeof(wholedisk), NULL);
+ ret = blkid_devno_to_wholedisk(devno,
+ wholedisk, sizeof(wholedisk), NULL);
+ if (ret) {
+ blkid_free_probe(probe);
+ return 0;
+ }
snprintf(sysfs_path, PATH_MAX, "/sys/block/%s/queue/rotational",
wholedisk);
snprintf(sysfs_path, PATH_MAX, "/sys/block/%s/queue/rotational",
wholedisk);