2 ### revert this patch, crazy udev devs
3 From: Kay Sievers <kay.sievers@suse.de>
4 Date: Fri, 4 Aug 2006 22:02:58 +0000 (+0200)
5 Subject: libvolume_id: read ufs2 label
7 X-Git-Url: http://www.kernel.org/git/?p=linux/hotplug/udev.git;a=commitdiff;h=eb82b76dedc1482b6434c46fee84d3ef13cb9648
9 libvolume_id: read ufs2 label
11 Taken from the FreeBSD HAL repository.
16 @@ -33,6 +33,9 @@ USE_GCOV = false
17 # include Security-Enhanced Linux support
20 +# comile with klibc instead of glibc
23 # set this to create statically linked binaries
26 @@ -139,6 +142,12 @@ ifeq ($(strip $(USE_GCOV)),true)
27 LDFLAGS += -fprofile-arcs
30 +ifeq ($(strip $(USE_KLIBC)),true)
31 + KLCC = /usr/bin/$(CROSS_COMPILE)klcc
36 ifeq ($(strip $(USE_SELINUX)),true)
37 UDEV_OBJS += udev_selinux.o
38 LIB_OBJS += -lselinux -lsepol
41 @@ -69,6 +69,10 @@ Compile Options:
43 If set to 'true', udev will be built with SELinux support
44 enabled. This is disabled by default.
46 + If set to 'true', udev is built and linked against klibc.
47 + Default value is 'false'. KLCC specifies the klibc compiler
48 + wrapper, usually located at /usr/bin/klcc.
50 list of helper programs in extras/ to build.
51 make EXTRAS="extras/cdrom_id extras/scsi_id extras/volume_id"
52 --- a/extras/scsi_id/scsi_id.c
53 +++ b/extras/scsi_id/scsi_id.c
54 @@ -402,7 +402,8 @@ static int set_options(int argc, char **
56 * optind is a global extern used by getopt. Since we can call
57 * set_options twice (once for command line, and once for config
58 - * file) we have to reset this back to 1.
59 + * file) we have to reset this back to 1. [Note glibc handles
60 + * setting this to 0, but klibc does not.]
64 --- a/test/simple-build-check.sh
65 +++ b/test/simple-build-check.sh
66 @@ -23,6 +23,14 @@ make clean EXTRAS="$EXTRAS" >/dev/null
67 make all $MAKEOPTS USE_LOG=false EXTRAS="$EXTRAS" || exit
71 +if [ -n "$KLCC" -a -e "$KLCC" ]; then
73 + make clean EXTRAS="$EXTRAS" >/dev/null
74 + make all -j4 $MAKEOPTS USE_KLIBC=true DEBUG=true EXTRAS="$EXTRAS" KLCC="$KLCC" || exit
78 # install in temporary dir and show it
81 --- a/udev_libc_wrapper.c
82 +++ b/udev_libc_wrapper.c
89 #define __OWN_USERDB_PARSER__
92 --- a/udev_libc_wrapper.h
93 +++ b/udev_libc_wrapper.h
94 @@ -105,7 +105,7 @@ static inline int inotify_add_watch(int
97 /* needed until /usr/include/sys/inotify.h is working */
100 #include <sys/inotify.h>
102 static inline int inotify_init(void)
103 @@ -117,7 +117,7 @@ static inline int inotify_add_watch(int
105 return syscall(__NR_inotify_add_watch, fd, name, mask);
107 -#endif /* __GLIBC__ */
108 +#endif /* __KLIBC__ */
109 #endif /* __NR_inotify_init */