mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
[PATCH] remove some more KLIBC fixups that are no longer needed.
This commit is contained in:
parent
2e31718495
commit
ede4308a80
@ -3,12 +3,6 @@
|
||||
#ifndef KLIBC_FIXUPS_H
|
||||
#define KLIBC_FIXUPS_H
|
||||
|
||||
|
||||
#define WTERMSIG(status) ((status) & 0x7f)
|
||||
#define WEXITSTATUS(status) (((status) & 0xff00) >> 8)
|
||||
#define WIFEXITED(status) (WTERMSIG(status) == 0)
|
||||
|
||||
|
||||
struct group {
|
||||
char *gr_name; /* group name */
|
||||
char *gr_passwd; /* group password */
|
||||
|
@ -109,19 +109,12 @@ static int create_node(struct udevice *dev)
|
||||
int retval = 0;
|
||||
uid_t uid = 0;
|
||||
gid_t gid = 0;
|
||||
dev_t res;
|
||||
int i;
|
||||
int tail;
|
||||
|
||||
strncpy(filename, udev_root, sizeof(filename));
|
||||
strncat(filename, dev->name, sizeof(filename));
|
||||
|
||||
#ifdef __KLIBC__
|
||||
res = (dev->major << 8) | (dev->minor);
|
||||
#else
|
||||
res = makedev(dev->major, dev->minor);
|
||||
#endif
|
||||
|
||||
switch (dev->type) {
|
||||
case 'b':
|
||||
dev->mode |= S_IFBLK;
|
||||
@ -144,7 +137,7 @@ static int create_node(struct udevice *dev)
|
||||
|
||||
info("creating device node '%s'", filename);
|
||||
dbg("mknod(%s, %#o, %u, %u)", filename, dev->mode, dev->major, dev->minor);
|
||||
retval = mknod(filename, dev->mode, res);
|
||||
retval = mknod(filename, dev->mode, makedev(dev->major, dev->minor));
|
||||
if (retval != 0)
|
||||
dbg("mknod(%s, %#o, %u, %u) failed with error '%s'",
|
||||
filename, dev->mode, dev->major, dev->minor, strerror(errno));
|
||||
|
Loading…
Reference in New Issue
Block a user