diff options
author | Neil Brown <neilb@suse.de> | 2008-05-15 15:50:56 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2008-05-15 15:50:56 +1000 |
commit | ea24acd07331283a31bf8398dfc2a7837dc0aaac (patch) | |
tree | f5f91fc6aeeef2b171e9339df9ae19a179e3415e /sysfs.c | |
parent | 54097ce72bacee68e5ceb5914ea3414f9688f282 (diff) | |
download | mdadm-ea24acd07331283a31bf8398dfc2a7837dc0aaac.tar.gz mdadm-ea24acd07331283a31bf8398dfc2a7837dc0aaac.tar.xz mdadm-ea24acd07331283a31bf8398dfc2a7837dc0aaac.zip |
Compiple fixes for mdassemble and diet-libc
Diffstat (limited to 'sysfs.c')
-rw-r--r-- | sysfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -84,10 +84,10 @@ struct mdinfo *sysfs_read(int fd, int devnum, unsigned long options) if (ioctl(fd, RAID_VERSION, &vers) != 0) return NULL; if (major(stb.st_rdev)==9) - sprintf(sra->sys_name, "md%d", minor(stb.st_rdev)); + sprintf(sra->sys_name, "md%d", (int)minor(stb.st_rdev)); else sprintf(sra->sys_name, "md_d%d", - minor(stb.st_rdev)>>MdpMinorShift); + (int)minor(stb.st_rdev)>>MdpMinorShift); } else { if (devnum >= 0) sprintf(sra->sys_name, "md%d", devnum); @@ -246,10 +246,10 @@ unsigned long long get_component_size(int fd) if (fstat(fd, &stb)) return 0; if (major(stb.st_rdev) == 9) sprintf(fname, "/sys/block/md%d/md/component_size", - minor(stb.st_rdev)); + (int)minor(stb.st_rdev)); else sprintf(fname, "/sys/block/md_d%d/md/component_size", - minor(stb.st_rdev)>>MdpMinorShift); + (int)minor(stb.st_rdev)>>MdpMinorShift); fd = open(fname, O_RDONLY); if (fd < 0) return 0; |