Thomas Schwinge | 25 May 20:13
Gravatar

Portability patches for GNU/Hurd

Hi!

The subject says is all.  :-)

Grüße,
 Thomas

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Thomas Schwinge | 25 May 20:11
Gravatar

[PATCH] kill: Check the correct variable when configuring.

Signed-off-by: Thomas Schwinge <thomas@...>
---
 configure.ac |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index a1b1e9b..eb67ada 100644
--- a/configure.ac
+++ b/configure.ac
@@ -976,7 +976,7 @@ AC_ARG_ENABLE([kill],
 )
 UL_BUILD_INIT([kill])
 UL_REQUIRES_LINUX([kill])
-AM_CONDITIONAL(BUILD_KILL, test "x$enable_kill" = xyes)
+AM_CONDITIONAL(BUILD_KILL, test "x$build_kill" = xyes)

 
 AC_ARG_ENABLE([last],
--

-- 
1.7.9

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Ludwig Nussel | 24 May 14:58
Picon
Gravatar

[PULL] su

Hi,

coreutils isn't really interested in maintaining su anymore.
Distributions have to add custom patches to fix bugs and add
features. The worst offender is probably the pam patch. Fortunately
we managed to sync the patch between openSUSE and Fedora meanwhile.
Over time the risk that the patches divert again increases though.
Since util-linux now contains a common login program it looks like a
good new home for su too.

To integrate su into util-linux I've extracted the history of the su
program until the last GPLv2 version (they've changed to GPLv3
meanwhile) from coreutils' git and merged it with util-linux.
Then I've added the patches used in Fedora and openSUSE and fixed the
files to actually build.

You can find the result in branch su-v1 (ff6b15d) at
git@...:lnussel/util-linux.git

I've also filed a pull request on github:
https://github.com/karelzak/util-linux/pull/10

Originally I had planned to implement separate tty allocation for
the child program on top of that to get rid of the evil setsid
patch. It turned out to be more complicated than I thought though. The
change would be too massive to backport anyways I guess. So the next
step would be to rip out the non-pam legacy stuff and clean up the code
to make it readable again.

cu
(Continue reading)

Dave Reisner | 23 May 22:35

[PATCH 1/3] logger: avoid explicit fclose(stdout)

This is done for us via an atexit hook since c05a80ca6385b8. Avoids a
useless 'Write error' on exit whenever invoking the tool.

Signed-off-by: Dave Reisner <dreisner@...>
---
 misc-utils/logger.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/misc-utils/logger.c b/misc-utils/logger.c
index 067272a..19b4c47 100644
--- a/misc-utils/logger.c
+++ b/misc-utils/logger.c
@@ -248,8 +248,6 @@ main(int argc, char **argv) {
 	else
 		LogSock = myopenlog(usock);

-	(void) fclose(stdout);
maximilian attems | 22 May 16:33
Picon

[PATCH] misc-utils: cleanup unused strings.h includes

Noticed on klibc building.

Signed-off-by: maximilian attems <max@...>
---
 misc-utils/kill.c   |    1 -
 misc-utils/logger.c |    1 -
 misc-utils/namei.c  |    1 -
 3 files changed, 3 deletions(-)

diff --git a/misc-utils/kill.c b/misc-utils/kill.c
index da7c8ab..c592f52 100644
--- a/misc-utils/kill.c
+++ b/misc-utils/kill.c
@@ -45,7 +45,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <strings.h>
 #include <ctype.h>		/* for isdigit() */
 #include <unistd.h>
 #include <signal.h>
diff --git a/misc-utils/logger.c b/misc-utils/logger.c
index db3469c..9805a7d 100644
--- a/misc-utils/logger.c
+++ b/misc-utils/logger.c
@@ -43,7 +43,6 @@
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
-#include <strings.h>
(Continue reading)

maximilian attems | 22 May 16:20
Picon

[PATCH] include: [c.h] protect container_of

fixes lots of warning noise:
../../../include/c.h:112:0: warning: "container_of" redefined [enabled
by default]
/usr/lib/klibc/include/stddef.h:52:0: note: this is the location of the
previous definition

Signed-off-by: maximilian attems <max@...>
---
 include/c.h |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/c.h b/include/c.h
index b6d8ced..8c8db73 100644
--- a/include/c.h
+++ b/include/c.h
@@ -109,9 +109,11 @@
 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
 #endif

+#ifndef container_of
 #define container_of(ptr, type, member) ({                       \
 	const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \
 	(type *)( (char *)__mptr - offsetof(type,member) );})
+#endif

 #ifndef HAVE_PROGRAM_INVOCATION_SHORT_NAME
 # ifdef HAVE___PROGNAME
--

-- 
1.7.10

(Continue reading)

Davidlohr Bueso | 20 May 18:11
Picon

[PATCH 5/6] fdisk: introduce fdisk context

From: Davidlohr Bueso <dave@...>

This is the first patch that adds the initial parts of the new fdisk internal API. Two functions are created
to both init and deinit the fdisk
context. Only the device's descriptor and path are added as a start and these are replaced throughout
fdisk.c and label specific code.

All logic that opens the file does it with fdisk_new_context_from_filename(), and this enforces always
opening the device with rw, then, if
unsuccessful, with read-only. This changes the current logic that opens the device with certain
permissions depending on the user given options.
For example, -l opens the device read-only.

This patch passed regression tests and local modifications for sgi/dos/sun disk labels.

Signed-off-by: Davidlohr Bueso <dave@...>
---
 fdisk/Makefile.am     |    1 +
 fdisk/fdisk.c         |   82 ++++++++++++++++++++++--------------------------
 fdisk/fdisk.h         |    9 +++++
 fdisk/fdiskbsdlabel.c |   44 +++++++++++++-------------
 fdisk/fdiskdoslabel.c |    6 ++--
 fdisk/fdisksgilabel.c |   24 +++++++-------
 fdisk/fdisksunlabel.c |   18 +++++-----
 fdisk/utils.c         |   71 ++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 165 insertions(+), 90 deletions(-)
 create mode 100644 fdisk/utils.c

diff --git a/fdisk/Makefile.am b/fdisk/Makefile.am
index 7851bd1..e9be841 100644
(Continue reading)

Davidlohr Bueso | 20 May 18:11
Picon

[PATCH 6/6] fdisk: add debug support

From: Davidlohr Bueso <dave@...>

Based on libmnt, this patch adds basic debugging support for fdisk. Currently only CONTEXT is debugged,
yet keeps exact functionality
as libmnt/libblkid.

Signed-off-by: Davidlohr Bueso <dave@...>
---
 fdisk/fdisk.c |    2 ++
 fdisk/fdisk.h |   27 +++++++++++++++++++++++++++
 fdisk/utils.c |   33 ++++++++++++++++++++++++++++++++-
 3 files changed, 61 insertions(+), 1 deletions(-)

diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c
index 400e682..9b91fa0 100644
--- a/fdisk/fdisk.c
+++ b/fdisk/fdisk.c
@@ -2168,6 +2168,8 @@ int main(int argc, char **argv)
 		}
 	}

+	fdisk_init_debug(0);
+
 	if (user_set_sector_size && argc-optind != 1)
 		printf(_("Warning: the -b (set sector size) option should"
 			 " be used with one specified device\n"));
diff --git a/fdisk/fdisk.h b/fdisk/fdisk.h
index c43517c..2471541 100644
--- a/fdisk/fdisk.h
+++ b/fdisk/fdisk.h
(Continue reading)

Davidlohr Bueso | 20 May 18:11
Picon

[PATCH 4/6] fdisk: use BSD label header

From: Davidlohr Bueso <dave@...>

Move bsd specific function definitions into its own header file and include it in fdisk code.

Signed-off-by: Davidlohr Bueso <dave@...>
---
 fdisk/fdisk.c         |    1 +
 fdisk/fdisk.h         |    6 ------
 fdisk/fdiskbsdlabel.h |    5 +++++
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c
index 08afb45..b6c5758 100644
--- a/fdisk/fdisk.c
+++ b/fdisk/fdisk.c
@@ -39,6 +39,7 @@
 #include "fdiskaixlabel.h"
 #include "fdiskmaclabel.h"
 #include "fdiskdoslabel.h"
+#include "fdiskbsdlabel.h"

 #ifdef HAVE_LINUX_COMPILER_H
 #include <linux/compiler.h>
diff --git a/fdisk/fdisk.h b/fdisk/fdisk.h
index 0dafbf8..82888dc 100644
--- a/fdisk/fdisk.h
+++ b/fdisk/fdisk.h
@@ -185,9 +185,3 @@ static inline int is_cleared_partition(struct partition *p)
 		 p->sys_ind || p->end_head || p->end_sector || p->end_cyl ||
 		 get_start_sect(p) || get_nr_sects(p));
(Continue reading)

Davidlohr Bueso | 20 May 18:11
Picon

[PATCH 3/6] fdisk: refactor -s option

From: Davidlohr Bueso <dave@...>

Signed-off-by: Davidlohr Bueso <dave@...>
---
 fdisk/fdisk.c |   41 ++++++++++++++++++++++-------------------
 1 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c
index 9387795..08afb45 100644
--- a/fdisk/fdisk.c
+++ b/fdisk/fdisk.c
@@ -2095,10 +2095,22 @@ static void command_prompt(void)
 	}
 }

+static unsigned long long get_dev_sz(char *dev)
+{
+	int fd;
+	unsigned long long size;
+	
+	if ((fd = open(dev, O_RDONLY)) < 0)
+		err(EXIT_FAILURE, _("unable to open %s"), dev);
+	if (blkdev_get_sectors(fd, &size) == -1)
+		fatal(ioctl_error);
+	close(fd);
+	return size/2;
+}
+
 int main(int argc, char **argv)
 {
(Continue reading)

Davidlohr Bueso | 20 May 18:11
Picon

[PATCH 2/6] fdisk: remove bogus statement

From: Davidlohr Bueso <dave@...>

usage() does not return, also move the help option handling to the bottom of the switch.

Signed-off-by: Davidlohr Bueso <dave@...>
---
 fdisk/fdisk.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c
index 2f3c119..9387795 100644
--- a/fdisk/fdisk.c
+++ b/fdisk/fdisk.c
@@ -2095,8 +2095,8 @@ static void command_prompt(void)
 	}
 }

-int
-main(int argc, char **argv) {
+int main(int argc, char **argv)
+{
 	int j, c;
 	int optl = 0, opts = 0;

@@ -2130,9 +2130,6 @@ main(int argc, char **argv) {
 			else if (optarg && strcmp(optarg, "=nondos"))
 				usage(stderr);
 			break;
-		case 'h':
-			usage(stdout);
(Continue reading)


Gmane