chiark / gitweb /
[PATCH] udev - exec status fix for klibc
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Sat, 10 Jan 2004 09:05:38 +0000 (01:05 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:13:14 +0000 (21:13 -0700)
Here is a patch to remove the ifdef's and fix klibc instead.

klibc_fixups.h
namedev.c

index a89638ead4b428e27eac67b3d463882e37b28e89..37622c86d621d9c3a888ad4b56c2cd9ed4a69d68 100644 (file)
@@ -4,6 +4,11 @@
 #define 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 */
 struct group {
        char    *gr_name;       /* group name */
        char    *gr_passwd;     /* group password */
index 226c1d313f65ef989ee5c72f58c9615759e329a5..08cceacda04d55c795fc9676c17dbc08692745de 100644 (file)
--- a/namedev.c
+++ b/namedev.c
@@ -401,12 +401,10 @@ static int exec_callout(struct config_device *dev, char *value, int len)
                        retval = -1;
                }
 
                        retval = -1;
                }
 
-#ifndef __KLIBC__
                if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0)) {
                        dbg("callout program status 0x%x", status);
                        retval = -1;
                }
                if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0)) {
                        dbg("callout program status 0x%x", status);
                        retval = -1;
                }
-#endif
        }
        return retval;
 }
        }
        return retval;
 }