udev-util: drop unused function udev_device_new_from_stat_rdev()
This commit is contained in:
@@ -37,25 +37,3 @@ int udev_parse_config(void) {
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int udev_device_new_from_stat_rdev(struct udev *udev, const struct stat *st, struct udev_device **ret) {
|
||||
struct udev_device *nd;
|
||||
char type;
|
||||
|
||||
assert(st);
|
||||
assert(ret);
|
||||
|
||||
if (S_ISBLK(st->st_mode))
|
||||
type = 'b';
|
||||
else if (S_ISCHR(st->st_mode))
|
||||
type = 'c';
|
||||
else
|
||||
return -ENOTTY;
|
||||
|
||||
nd = udev_device_new_from_devnum(udev, type, st->st_rdev);
|
||||
if (!nd)
|
||||
return -errno;
|
||||
|
||||
*ret = nd;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -11,5 +11,3 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_ctrl_connection*, udev_ctrl_connection_u
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_ctrl_msg*, udev_ctrl_msg_unref);
|
||||
|
||||
int udev_parse_config(void);
|
||||
|
||||
int udev_device_new_from_stat_rdev(struct udev *udev, const struct stat *st, struct udev_device **ret);
|
||||
|
||||
Reference in New Issue
Block a user