1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

lvmlockd: use standard major minor functions

This commit is contained in:
David Teigland 2018-11-02 15:58:47 -05:00
parent e7a56d5cd3
commit 5d747f724e

View File

@ -44,7 +44,7 @@
#include <errno.h> #include <errno.h>
#include <syslog.h> #include <syslog.h>
#include <blkid/blkid.h> #include <blkid/blkid.h>
#include <linux/kdev_t.h> #include <sys/sysmacros.h>
#define ONE_MB 1048576 #define ONE_MB 1048576
@ -351,7 +351,7 @@ static void _read_sysfs_size(dev_t devno, const char *name, unsigned int *val)
size_t len; size_t len;
snprintf(path, sizeof(path), "/sys/dev/block/%d:%d/queue/%s", snprintf(path, sizeof(path), "/sys/dev/block/%d:%d/queue/%s",
(int)MAJOR(devno), (int)MINOR(devno), name); (int)major(devno), (int)minor(devno), name);
if (!(fp = fopen(path, "r"))) if (!(fp = fopen(path, "r")))
return; return;