diff options
Diffstat (limited to 'mkfs.c')
-rw-r--r-- | mkfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1193,13 +1193,13 @@ static int is_ssd(const char *file) return 0; } - if (read(fd, &rotational, sizeof(char)) < sizeof(char)) { + if (read(fd, &rotational, 1) < 1) { close(fd); return 0; } close(fd); - return !atoi((const char *)&rotational); + return rotational == '0'; } static int _cmp_device_by_id(void *priv, struct list_head *a, @@ -1735,7 +1735,7 @@ int main(int argc, char **argv) } mkfs_cfg.label = label; - mkfs_cfg.fs_uuid = fs_uuid; + memcpy(mkfs_cfg.fs_uuid, fs_uuid, sizeof(mkfs_cfg.fs_uuid)); memcpy(mkfs_cfg.blocks, blocks, sizeof(blocks)); mkfs_cfg.num_bytes = dev_block_count; mkfs_cfg.nodesize = nodesize; |