diff options
author | Dimitri John Ledkov <xnox@ubuntu.com> | 2016-09-22 14:47:57 +0100 |
---|---|---|
committer | Dimitri John Ledkov <xnox@ubuntu.com> | 2016-09-22 14:47:57 +0100 |
commit | c92ba05933a640c0084321bc6eeaa091c283b8bb (patch) | |
tree | 72cdcdec5d50586a244ba8743356d3fd2ecb1b4c /mkfs.c | |
parent | 249a3592d5dfdec0e52b5e9e712339364ea758ed (diff) |
New upstream release.
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; |