summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJes Sorensen <jsorensen@fb.com>2017-09-30 00:04:06 +0200
committerJes Sorensen <jsorensen@fb.com>2017-09-30 00:04:06 +0200
commita37563c91386a0c53d2d46aad00fe89ee28bd0da (patch)
treeb3a3c494e187438da61504f6326931493457bea1
parentlib: devid2kname() should take a dev_t (diff)
downloadmdadm-a37563c91386a0c53d2d46aad00fe89ee28bd0da.tar.xz
mdadm-a37563c91386a0c53d2d46aad00fe89ee28bd0da.zip
sysfs_init_dev - take a dev_t argument
Be consistent and use the correct type. Signed-off-by: Jes Sorensen <jsorensen@fb.com>
-rw-r--r--mdadm.h2
-rw-r--r--sysfs.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/mdadm.h b/mdadm.h
index db081883..3fc8a4fb 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -654,7 +654,7 @@ enum sysfs_read_flags {
*/
extern int sysfs_open(char *devnm, char *devname, char *attr);
extern int sysfs_init(struct mdinfo *mdi, int fd, char *devnm);
-extern void sysfs_init_dev(struct mdinfo *mdi, unsigned long devid);
+extern void sysfs_init_dev(struct mdinfo *mdi, dev_t devid);
extern void sysfs_free(struct mdinfo *sra);
extern struct mdinfo *sysfs_read(int fd, char *devnm, unsigned long options);
extern int sysfs_attr_match(const char *attr, const char *str);
diff --git a/sysfs.c b/sysfs.c
index 78d2b526..68ddd5f4 100644
--- a/sysfs.c
+++ b/sysfs.c
@@ -78,7 +78,7 @@ int sysfs_open(char *devnm, char *devname, char *attr)
return fd;
}
-void sysfs_init_dev(struct mdinfo *mdi, unsigned long devid)
+void sysfs_init_dev(struct mdinfo *mdi, dev_t devid)
{
snprintf(mdi->sys_name,
sizeof(mdi->sys_name), "dev-%s", devid2kname(devid));