Util-Linux package development
 help / color / mirror / Atom feed
* [patch 8/8] [PATCH] lscpu: add physical cpu address to parseable output
From: Heiko Carstens @ 2011-08-10  8:36 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux, Heiko Carstens
In-Reply-To: <20110810083645.135814950@de.ibm.com>

From: Heiko Carstens <heiko.carstens@de.ibm.com>

Print also the physical cpu address for each logical cpu in parsable
output if selected and present via sysfs.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 sys-utils/lscpu.1 |    5 +++--
 sys-utils/lscpu.c |   22 ++++++++++++++++++++--
 2 files changed, 23 insertions(+), 4 deletions(-)

--- a/sys-utils/lscpu.1
+++ b/sys-utils/lscpu.1
@@ -32,8 +32,9 @@ separate CPU cache columns. If no CPU ca
 columns are not printed at all.
 
 The \fIlist\fP argument is comma delimited list of the columns. Currently
-supported are CPU, Core, Node, Socket, Book, Cache and Polarization columns. If the
-\fIlist\fP argument is given then always all requested columns are printed in
+supported are CPU, Core, Node, Socket, Book, Cache, Polarization and Address
+columns.
+If the \fIlist\fP argument is given then always all requested columns are printed in
 the defined order. The Cache columns are separated by ':'.
 
 Note that the optional \fIlist\fP argument cannot be separated from the
--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -168,6 +168,7 @@ struct lscpu_desc {
 	struct cpu_cache *caches;
 
 	int		*polarization;	/* cpu polarization */
+	int		*addresses;	/* physical cpu addresses */
 };
 
 static size_t sysrootlen;
@@ -199,7 +200,8 @@ enum {
 	COL_NODE,
 	COL_BOOK,
 	COL_CACHE,
-	COL_POLARIZATION
+	COL_POLARIZATION,
+	COL_ADDRESS
 };
 
 static const char *colnames[] =
@@ -210,7 +212,8 @@ static const char *colnames[] =
 	[COL_NODE] = "Node",
 	[COL_BOOK] = "Book",
 	[COL_CACHE] = "Cache",
-	[COL_POLARIZATION] = "Polarization"
+	[COL_POLARIZATION] = "Polarization",
+	[COL_ADDRESS] = "Address"
 };
 
 
@@ -762,6 +765,16 @@ read_polarization(struct lscpu_desc *des
 		desc->polarization[num] = POLAR_UNKNOWN;
 }
 
+static void
+read_address(struct lscpu_desc *desc, int num)
+{
+	if (!path_exist(_PATH_SYS_CPU "/cpu%d/address", num))
+		return;
+	if (!desc->addresses)
+		desc->addresses = xcalloc(desc->ncpus, sizeof(int));
+	desc->addresses[num] = path_getnum(_PATH_SYS_CPU "/cpu%d/address", num);
+}
+
 static int
 cachecmp(const void *a, const void *b)
 {
@@ -916,6 +929,10 @@ print_parsable_cell(struct lscpu_desc *d
 		if (desc->polarization)
 			printf("%s", polar_modes[desc->polarization[i]]);
 		break;
+	case COL_ADDRESS:
+		if (desc->addresses)
+			printf("%d", desc->addresses[i]);
+		break;
 	}
 }
 
@@ -1230,6 +1247,7 @@ int main(int argc, char *argv[])
 		read_topology(desc, i);
 		read_cache(desc, i);
 		read_polarization(desc, i);
+		read_address(desc, i);
 	}
 
 	qsort(desc->caches, desc->ncaches, sizeof(struct cpu_cache), cachecmp);

^ permalink raw reply

* [patch 7/8] [PATCH] lscpu: add cpu polarization to parseable output
From: Heiko Carstens @ 2011-08-10  8:36 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux, Heiko Carstens
In-Reply-To: <20110810083645.135814950@de.ibm.com>

From: Heiko Carstens <heiko.carstens@de.ibm.com>

When running in different dispatching mode the virtual cpus may
have different polarizations.
E.g. in "vertical" mode cpus may have a polarization of "vertical:high"
which means the virtual cpu has dedicated physical cpu assigned.
Print this information in the parsable output.

Note that this breaks the current rule that
a) the parseable output contains only numbers
b) these numbers are equal or increased in each line

Since however this new item must be selected with the "list" argument
this shouldn't be a problem.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 sys-utils/lscpu.1 |    2 +-
 sys-utils/lscpu.c |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 52 insertions(+), 3 deletions(-)

--- a/sys-utils/lscpu.1
+++ b/sys-utils/lscpu.1
@@ -32,7 +32,7 @@ separate CPU cache columns. If no CPU ca
 columns are not printed at all.
 
 The \fIlist\fP argument is comma delimited list of the columns. Currently
-supported are CPU, Core, Node, Socket, Book and Cache columns. If the
+supported are CPU, Core, Node, Socket, Book, Cache and Polarization columns. If the
 \fIlist\fP argument is given then always all requested columns are printed in
 the defined order. The Cache columns are separated by ':'.
 
--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -108,6 +108,23 @@ const char *disp_modes[] = {
 	[DISP_VERTICAL]		= N_("vertical")
 };
 
+/* cpu polarization */
+enum {
+	POLAR_UNKNOWN	= 0,
+	POLAR_VLOW,
+	POLAR_VMEDIUM,
+	POLAR_VHIGH,
+	POLAR_HORIZONTAL
+};
+
+const char *polar_modes[] = {
+	[POLAR_UNKNOWN]		= "U",
+	[POLAR_VLOW]		= "VL",
+	[POLAR_VMEDIUM]		= "VM",
+	[POLAR_VHIGH]		= "VH",
+	[POLAR_HORIZONTAL]	= "H"
+};
+
 /* global description */
 struct lscpu_desc {
 	char	*arch;
@@ -149,6 +166,8 @@ struct lscpu_desc {
 
 	int		ncaches;
 	struct cpu_cache *caches;
+
+	int		*polarization;	/* cpu polarization */
 };
 
 static size_t sysrootlen;
@@ -179,7 +198,8 @@ enum {
 	COL_SOCKET,
 	COL_NODE,
 	COL_BOOK,
-	COL_CACHE
+	COL_CACHE,
+	COL_POLARIZATION
 };
 
 static const char *colnames[] =
@@ -189,7 +209,8 @@ static const char *colnames[] =
 	[COL_SOCKET] = "Socket",
 	[COL_NODE] = "Node",
 	[COL_BOOK] = "Book",
-	[COL_CACHE] = "Cache"
+	[COL_CACHE] = "Cache",
+	[COL_POLARIZATION] = "Polarization"
 };
 
 
@@ -717,6 +738,29 @@ read_topology(struct lscpu_desc *desc, i
 	if (book_siblings)
 		add_cpuset_to_array(desc->bookmaps, &desc->nbooks, book_siblings);
 }
+static void
+read_polarization(struct lscpu_desc *desc, int num)
+{
+	char mode[64];
+
+	if (desc->dispatching < 0)
+		return;
+	if (!path_exist(_PATH_SYS_CPU "/cpu%d/polarization", num))
+		return;
+	if (!desc->polarization)
+		desc->polarization = xcalloc(desc->ncpus, sizeof(int));
+	path_getstr(mode, sizeof(mode), _PATH_SYS_CPU "/cpu%d/polarization", num);
+	if (strncmp(mode, "vertical:low", sizeof(mode)) == 0)
+		desc->polarization[num] = POLAR_VLOW;
+	else if (strncmp(mode, "vertical:medium", sizeof(mode)) == 0)
+		desc->polarization[num] = POLAR_VMEDIUM;
+	else if (strncmp(mode, "vertical:high", sizeof(mode)) == 0)
+		desc->polarization[num] = POLAR_VHIGH;
+	else if (strncmp(mode, "horizontal", sizeof(mode)) == 0)
+		desc->polarization[num] = POLAR_HORIZONTAL;
+	else
+		desc->polarization[num] = POLAR_UNKNOWN;
+}
 
 static int
 cachecmp(const void *a, const void *b)
@@ -868,6 +912,10 @@ print_parsable_cell(struct lscpu_desc *d
 				putchar(',');
 		}
 		break;
+	case COL_POLARIZATION:
+		if (desc->polarization)
+			printf("%s", polar_modes[desc->polarization[i]]);
+		break;
 	}
 }
 
@@ -1181,6 +1229,7 @@ int main(int argc, char *argv[])
 			continue;
 		read_topology(desc, i);
 		read_cache(desc, i);
+		read_polarization(desc, i);
 	}
 
 	qsort(desc->caches, desc->ncaches, sizeof(struct cpu_cache), cachecmp);

^ permalink raw reply

* [patch 6/8] [PATCH] lscpu: show dispatching mode
From: Heiko Carstens @ 2011-08-10  8:36 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux, Heiko Carstens
In-Reply-To: <20110810083645.135814950@de.ibm.com>

From: Heiko Carstens <heiko.carstens@de.ibm.com>

A virtual guest my run in either "horiziontal" or "vertical" mode
which is the mode in which the underlying hypervisor schedules the
guest cpu.
Since this is of interest print this in the readable output.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 sys-utils/lscpu.c |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -97,6 +97,17 @@ struct cpu_cache {
 	cpu_set_t	**sharedmaps;
 };
 
+/* dispatching modes */
+enum {
+	DISP_HORIZONTAL = 0,
+	DISP_VERTICAL	= 1
+};
+
+const char *disp_modes[] = {
+	[DISP_HORIZONTAL]	= N_("horizontal"),
+	[DISP_VERTICAL]		= N_("vertical")
+};
+
 /* global description */
 struct lscpu_desc {
 	char	*arch;
@@ -110,6 +121,7 @@ struct lscpu_desc {
 	char	*stepping;
 	char    *bogomips;
 	char	*flags;
+	int	dispatching;	/* none, horizontal or vertical */
 	int	mode;		/* rm, lm or/and tm */
 
 	int		ncpus;		/* number of CPUs */
@@ -478,6 +490,12 @@ read_basicinfo(struct lscpu_desc *desc)
 		desc->online = path_cpulist(_PATH_SYS_SYSTEM "/cpu/online");
 		desc->nthreads = CPU_COUNT_S(setsize, desc->online);
 	}
+
+	/* get dispatching mode */
+	if (path_exist(_PATH_SYS_SYSTEM "/cpu/dispatching"))
+		desc->dispatching = path_getnum(_PATH_SYS_SYSTEM "/cpu/dispatching");
+	else
+		desc->dispatching = -1;
 }
 
 static int
@@ -1065,6 +1083,8 @@ print_readable(struct lscpu_desc *desc,
 		print_s(_("Hypervisor vendor:"), hv_vendors[desc->hyper]);
 		print_s(_("Virtualization type:"), virt_types[desc->virtype]);
 	}
+	if (desc->dispatching >= 0)
+		print_s(_("Dispatching mode:"), disp_modes[desc->dispatching]);
 	if (desc->ncaches) {
 		char buf[512];
 		int i;

^ permalink raw reply

* [patch 5/8] [PATCH] lscpu: use hypervisor generated topology information
From: Heiko Carstens @ 2011-08-10  8:36 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux, Heiko Carstens
In-Reply-To: <20110810083645.135814950@de.ibm.com>

From: Heiko Carstens <heiko.carstens@de.ibm.com>

The readable output prints also informations like cores per socket etc.
On newer kernel versions on s390 this information is available via
/proc/sysinfo. However it does not contain the layout of the guest but
the layout of the real machine.
Nevertheless this is better than random guessing with completely broken
numbers like we have it now on s390. If the information is not available
we fall back to old mechanism with more or less random numbers.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 sys-utils/lscpu.c |   33 +++++++++++++++++++++++++++++----
 1 file changed, 29 insertions(+), 4 deletions(-)

--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -1007,13 +1007,38 @@ print_readable(struct lscpu_desc *desc,
 	}
 
 	if (desc->nsockets) {
+		int cores_per_socket, sockets_per_book, books;
+
+		cores_per_socket = sockets_per_book = books = 0;
+		/* s390 detects its cpu topology via /proc/sysinfo, if present.
+		 * Using simply the cpu topology masks in sysfs will not give
+		 * usable results since everything is virtualized. E.g.
+		 * virtual core 0 may have only 1 cpu, but virtual core 2 may
+		 * five cpus.
+		 * If the cpu topology is not exported (e.g. 2nd level guest)
+		 * fall back to old calculation scheme.
+		 */
+		if (path_exist(_PATH_PROC_SYSINFO)) {
+			FILE *fd = path_fopen("r", 0, _PATH_PROC_SYSINFO);
+			char buf[BUFSIZ];
+			int t0, t1, t2;
+
+			while (fgets(buf, sizeof(buf), fd) != NULL) {
+				if (sscanf(buf, "CPU Topology SW:%d%d%d%d%d%d",
+					   &t0, &t1, &t2, &books, &sockets_per_book,
+					   &cores_per_socket) == 6)
+					break;
+			}
+		}
 		print_n(_("Thread(s) per core:"), desc->nthreads / desc->ncores);
-		print_n(_("Core(s) per socket:"), desc->ncores / desc->nsockets);
+		print_n(_("Core(s) per socket:"),
+			cores_per_socket ?: desc->ncores / desc->nsockets);
 		if (desc->nbooks) {
-			print_n(_("Socket(s) per book:"), desc->nsockets / desc->nbooks);
-			print_n(_("Book(s):"), desc->nbooks);
+			print_n(_("Socket(s) per book:"),
+				sockets_per_book ?: desc->nsockets / desc->nbooks);
+			print_n(_("Book(s):"), books ?: desc->nbooks);
 		} else {
-			print_n(_("Socket(s):"), desc->nsockets);
+			print_n(_("Socket(s):"), sockets_per_book ?: desc->nsockets);
 		}
 	}
 	if (desc->nnodes)

^ permalink raw reply

* [patch 4/8] [PATCH] lscpu: detect IBM hypervisor
From: Heiko Carstens @ 2011-08-10  8:36 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux, Heiko Carstens
In-Reply-To: <20110810083645.135814950@de.ibm.com>

From: Heiko Carstens <heiko.carstens@de.ibm.com>

Detect if the hypervisor on s390 is from KVM or IBM.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 sys-utils/lscpu.c |   22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -50,6 +50,7 @@
 #define _PATH_PROC_XENCAP	_PATH_PROC_XEN "/capabilities"
 #define _PATH_PROC_CPUINFO	"/proc/cpuinfo"
 #define _PATH_PROC_PCIDEVS	"/proc/bus/pci/devices"
+#define _PATH_PROC_SYSINFO	"/proc/sysinfo"
 
 /* virtualization types */
 enum {
@@ -69,14 +70,16 @@ enum {
 	HYPER_XEN,
 	HYPER_KVM,
 	HYPER_MSHV,
-	HYPER_VMWARE
+	HYPER_VMWARE,
+	HYPER_IBM
 };
 const char *hv_vendors[] = {
 	[HYPER_NONE]	= NULL,
 	[HYPER_XEN]	= "Xen",
 	[HYPER_KVM]	= "KVM",
 	[HYPER_MSHV]	= "Microsoft",
-	[HYPER_VMWARE]  = "VMware"
+	[HYPER_VMWARE]  = "VMware",
+	[HYPER_IBM]	= "IBM"
 };
 
 /* CPU modes */
@@ -598,6 +601,21 @@ read_hypervisor(struct lscpu_desc *desc)
 		/* Xen full-virt on non-x86_64 */
 		desc->hyper = HYPER_XEN;
 		desc->virtype = VIRT_FULL;
+	} else if (path_exist(_PATH_PROC_SYSINFO)) {
+		FILE *fd = path_fopen("r", 0, _PATH_PROC_SYSINFO);
+		char buf[BUFSIZ];
+
+		desc->hyper = HYPER_IBM;
+		desc->virtype = VIRT_FULL;
+		while (fgets(buf, sizeof(buf), fd) != NULL) {
+			if (!strstr(buf, "Control Program:"))
+				continue;
+			if (!strstr(buf, "KVM"))
+				desc->hyper = HYPER_IBM;
+			else
+				desc->hyper = HYPER_KVM;
+		}
+		fclose(fd);
 	}
 }
 

^ permalink raw reply

* [patch 3/8] [PATCH] lscpu: fix fallback nthreads calculation
From: Heiko Carstens @ 2011-08-10  8:36 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux, Heiko Carstens
In-Reply-To: <20110810083645.135814950@de.ibm.com>

From: Heiko Carstens <heiko.carstens@de.ibm.com>

The fallback calculation of nthreads did not consider books.
In order to avoid division/multiply by/with zero make sure each number
used is at least "1".

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 sys-utils/lscpu.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -649,17 +649,21 @@ read_topology(struct lscpu_desc *desc, i
 		nthreads = CPU_COUNT_S(setsize, thread_siblings);
 		/* cores within one socket */
 		ncores = CPU_COUNT_S(setsize, core_siblings) / nthreads;
-		/* number of sockets within one book */
-		nsockets = desc->ncpus / nthreads / ncores;
+		/* number of sockets within one book.
+		 * Because of odd / non-present cpu maps and to keep
+		 * calculation easy we make sure that nsockets and
+		 * nbooks is at least 1.
+		 */
+		nsockets = desc->ncpus / nthreads / ncores ?: 1;
 		/* number of books */
-		nbooks = desc->ncpus / nthreads / ncores / nsockets;
+		nbooks = desc->ncpus / nthreads / ncores / nsockets ?: 1;
 
 		/* all threads, see also read_basicinfo()
-		 * -- this is fallback for kernels where is not
+		 * -- fallback for kernels without
 		 *    /sys/devices/system/cpu/online.
 		 */
 		if (!desc->nthreads)
-			desc->nthreads = nsockets * ncores * nthreads;
+			desc->nthreads = nbooks * nsockets * ncores * nthreads;
 		/* For each map we make sure that it can have up to ncpus
 		 * entries. This is because we cannot reliably calculate the
 		 * number of cores, sockets and books on all architectures.

^ permalink raw reply

* [patch 2/8] [PATCH] lscpu: fix cpu map array sizes
From: Heiko Carstens @ 2011-08-10  8:36 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux, Heiko Carstens
In-Reply-To: <20110810083645.135814950@de.ibm.com>

From: Heiko Carstens <heiko.carstens@de.ibm.com>

Completely virtualized architectures like s390 may have multiple
virtual sockets and/or cores where each of them has a different
number of cores and cpus.
So the general assumption within the allocation scheme that e.g.
each socket contains the same number of cores is not necessarily
true. To make sure the arrays are always large enough we simply
allocate enough memory so that each array could hold cpu masks
for all present cpus.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 sys-utils/lscpu.c |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -660,11 +660,16 @@ read_topology(struct lscpu_desc *desc, i
 		 */
 		if (!desc->nthreads)
 			desc->nthreads = nsockets * ncores * nthreads;
+		/* For each map we make sure that it can have up to ncpus
+		 * entries. This is because we cannot reliably calculate the
+		 * number of cores, sockets and books on all architectures.
+		 * E.g. completely virtualized architectures like s390 may
+		 * have multiple sockets of different sizes.
+		 */
+		desc->coremaps = xcalloc(desc->ncpus, sizeof(cpu_set_t *));
+		desc->socketmaps = xcalloc(desc->ncpus, sizeof(cpu_set_t *));
 		if (book_siblings)
-			desc->bookmaps = xcalloc(nbooks, sizeof(cpu_set_t *));
-
-		desc->socketmaps = xcalloc(nsockets, sizeof(cpu_set_t *));
-		desc->coremaps = xcalloc(ncores * nsockets, sizeof(cpu_set_t *));
+			desc->bookmaps = xcalloc(desc->ncpus, sizeof(cpu_set_t *));
 	}
 
 	add_cpuset_to_array(desc->socketmaps, &desc->nsockets, core_siblings);

^ permalink raw reply

* [patch 1/8] [PATCH] lscpu: fix s390 bogomips detection coding style
From: Heiko Carstens @ 2011-08-10  8:36 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux, Heiko Carstens
In-Reply-To: <20110810083645.135814950@de.ibm.com>

From: Heiko Carstens <heiko.carstens@de.ibm.com>

Just make the s390 bogomips detection line look like all others.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 sys-utils/lscpu.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -434,8 +434,7 @@ read_basicinfo(struct lscpu_desc *desc)
 		else if (lookup(buf, "features", &desc->flags)) ;	/* s390 */
 		else if (lookup(buf, "type", &desc->flags)) ;		/* sparc64 */
 		else if (lookup(buf, "bogomips", &desc->bogomips)) ;
-		/* S390 */
-		else if (lookup(buf, "bogomips per cpu", &desc->bogomips)) ;
+		else if (lookup(buf, "bogomips per cpu", &desc->bogomips)) ; /* s390 */
 		else
 			continue;
 	}

^ permalink raw reply

* [patch 0/8] various lscpu patches
From: Heiko Carstens @ 2011-08-10  8:36 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux

Hi Karel,

here are a couple of fixes and improvemts for lscpu on s390.
Hopefully I didn't screw up anything ;)
At least on my Thinkpad everything still works as before and the output
on s390 machines is much improved.

Thanks,
Heiko

^ permalink raw reply

* [PATCH] befs.c: validate di_br_size !=0 and br_per_di_br != 0
From: Timo Warns @ 2011-08-09  7:40 UTC (permalink / raw)
  To: util-linux

Validate that di_br_size !=0 and br_per_di_br != 0. If one of them is 0, a
division-by-zero error will be triggered.

Signed-off-by: Timo Warns <warns@pre-sense.de>
---
diff -u util-linux-2.20-rc1-a/libblkid/src/superblocks/befs.c util-linux-2.20-rc1-b/libblkid/src/superblocks/befs.c
--- util-linux-2.20-rc1-a/libblkid/src/superblocks/befs.c	2011-07-20 21:55:23.000000000 +0200
+++ util-linux-2.20-rc1-b/libblkid/src/superblocks/befs.c	2011-08-09 09:32:56.000000000 +0200
@@ -200,9 +200,16 @@
 		int64_t di_br_size, br_per_di_br, di_index, i_index;
 
 		start -= FS64_TO_CPU(ds->max_indirect_range, fs_le);
+
 		di_br_size = (int64_t) FS16_TO_CPU(ds->double_indirect.len,
 				fs_le) << FS32_TO_CPU(bs->block_shift, fs_le);
+		if (di_br_size == 0)
+			return NULL;
+
 		br_per_di_br = di_br_size / sizeof(struct block_run);
+		if (br_per_di_br == 0)
+			return NULL;
+
 		di_index = start / (br_per_di_br * di_br_size);
 		i_index = (start % (br_per_di_br * di_br_size)) / di_br_size;
 		start = (start % (br_per_di_br * di_br_size)) % di_br_size;


^ permalink raw reply

* Re: [PATCH] correct trivial typo
From: Karel Zak @ 2011-08-08 11:55 UTC (permalink / raw)
  To: Davidlohr Bueso; +Cc: util-linux
In-Reply-To: <1312773379.3050.0.camel@offbook>

On Sun, Aug 07, 2011 at 11:16:19PM -0400, Davidlohr Bueso wrote:
>  lib/loopdev.c          |    2 +-
>  libmount/src/context.c |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

 Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply

* Re: [PATCH] libmnt: fix undefined sources
From: Karel Zak @ 2011-08-08 11:54 UTC (permalink / raw)
  To: Davidlohr Bueso; +Cc: util-linux
In-Reply-To: <1312675826.3408.1.camel@offbook>

On Sat, Aug 06, 2011 at 08:10:26PM -0400, Davidlohr Bueso wrote:
>  libmount/src/cache.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)

 Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply

* Re: [PATCH] Documentation: add debugging doc
From: Karel Zak @ 2011-08-08 11:51 UTC (permalink / raw)
  To: Davidlohr Bueso; +Cc: util-linux
In-Reply-To: <1312678772.3408.3.camel@offbook>

On Sat, Aug 06, 2011 at 08:59:32PM -0400, Davidlohr Bueso wrote:
> From: Davidlohr Bueso <dave@gnu.org>
> 
> Layout the base for tips on debugging util-linux programs/wrappers.
> 
> Signed-off-by: Davidlohr Bueso <dave@gnu.org>
> ---
>  Documentation/README.debug |   30 ++++++++++++++++++++++++++++++
>  1 files changed, 30 insertions(+), 0 deletions(-)
>  create mode 100644 Documentation/README.debug

 I'll merge this change after v2.20 stable release. The v2.20 will be
 without the Documentation/ directory.

> +When this command is run, there's a library dependency error:
> +./mount: /lib/x86_64-linux-gnu/libblkid.so.1: version `BLKID_2.20' not found (required by ./mount)

 BTW, for mount I sometimes use --enable-static-programs and then
 mount/mount.static which is out of the libtool control :-)

    Karel


-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply

* Re: [git pull] documentation directory
From: Karel Zak @ 2011-08-08 11:46 UTC (permalink / raw)
  To: kerolasa; +Cc: util-linux
In-Reply-To: <CAG27Bk0wyFiELxMA2Rj9DyqqMkP9dGm4J1Y=yU4S7gZFo00QFw@mail.gmail.com>

On Sat, Aug 06, 2011 at 07:57:53PM +0200, Sami Kerola wrote:
> are available in the git repository at:
>   https://github.com/kerolasa/lelux-utiliteetit docs-dir
> 
> discussion, and few rejects, before the Documentation/ is done to
> upstream. For instance you might disagree with contents of
> 00-about-docs.txt, and perhaps example.files/ should be deleted.

 The 'Warning about content' in 00-about-docs.txt is too crazy :-)
 Let's:
 
  - cleanup the files
  - remove obsolete information
  - move valid information to the man pages
  - add info about authors to the AUTHORS file
 
 I have updated the example.files/ in the master branch.

>  README.devel => Documentation/README.devel         |    0

 see below

>  .../ReleaseNotes}/v2.13-ReleaseNotes               |    0

 What about to rename the directory to releases/ ? The NEWS file should
 be updated too.

>  README.licensing => Documentation/licensing.txt    |    0

 It would be nice to keep this file in the top-level directory.

>  tests/README => Documentation/tests.txt            |    0

 howto-tests.txt

>  Documentation/usage-howto.txt                      |   73 ++++++++++++++++++++

 howto-usage-function.txt

   and s/output/display/ in the file

 we also need howto-man-page.txt :-)


 I think we can split the README file:

    README  (basic info about project)

    Documentation/howto-compilation.txt 

 In the howto-compilation.txt file should be also a note about
 autogen.sh, static linking, klib and uClib and maybe some preferred
 compiler options, I use:
 
   -Wmissing-parameter-type -Wsign-compare -Wtype-limits -Wuninitialized \
   -Wunused-parameter -Wunused-but-set-parameter -fno-common

 We can also split README.devel to:

    Documentation/howto-compilation.txt (add extra section for
    developers (or SCM users) about about autotools).

    Documentation/howto-contribute.txt with info about "ideal
    patches", coding style.

    Documentation/source-code-management.txt


    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply

* Re: [PATCH] look: fix manpage formatting
From: Karel Zak @ 2011-08-08  9:51 UTC (permalink / raw)
  To: util-linux
In-Reply-To: <20110802125605.GA12297@foxbat.suse.cz>

On Tue, Aug 02, 2011 at 02:56:06PM +0200, Petr Uzel wrote:
>  misc-utils/look.1 |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

 Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply

* Re: [patches] small corrections to a few man pages
From: Karel Zak @ 2011-08-08 10:05 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: Util-Linux
In-Reply-To: <1312395717.22139.2159101333@webmail.messagingengine.com>

On Wed, Aug 03, 2011 at 08:21:57PM +0200, Benno Schulenberg wrote:
> Attached first patch corrects "fistt" to "first" in the help text of cal,
> and seizes the opportunity to clarify the text and add uppercase where 
> needed.  The second patch corrects the short option for --timeout (from 
> -t to -w) in the man page of findmnt, and then fixes some markup and
> spacing issues.
> 
> Most utilities use -V as the short option for --version, only a few
> use -v instead; several use -v for --verbose.  The third patch makes
> wipefs conform to the majority now that the option is still fresh, and
> adds it to the man page.
> 
> The other five patches correct typos, grammar, markup and spacing
> in five other man pages.

 Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply

* Re: [PATCH] wall: build with SUID_{C,LD}FLAGS
From: Karel Zak @ 2011-08-08  9:51 UTC (permalink / raw)
  To: util-linux
In-Reply-To: <20110802132730.GA2195@foxbat.suse.cz>

On Tue, Aug 02, 2011 at 03:27:32PM +0200, Petr Uzel wrote:
>  term-utils/Makefile.am |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)

 Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply

* Re: [PATCH] cal: fix manpage formatting
From: Karel Zak @ 2011-08-08  9:51 UTC (permalink / raw)
  To: util-linux
In-Reply-To: <20110802125553.GA12229@foxbat.suse.cz>

On Tue, Aug 02, 2011 at 02:55:55PM +0200, Petr Uzel wrote:
>  misc-utils/cal.1 |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)

Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply

* Re: umount -a
From: Tom Gundersen @ 2011-08-08  9:15 UTC (permalink / raw)
  To: Karel Zak; +Cc: Bruce Dubbs, util-linux
In-Reply-To: <20110808085422.GH2204@nb.net.home>

On Mon, Aug 8, 2011 at 10:54 AM, Karel Zak <kzak@redhat.com> wrote:
>> Would it be reasonable to change umount -a to also omit /run if it is
>> mounted as a tmpfs?
>
>  umount -a -t notmpfs  ?

This might not work as intended if you have a tmpfs mounted on top of
a regular fs (in which case you would like to unmount them both).

I think the correct solution is to do as dracut and have a shutdown
ramfs from where you can unmount rootfs and all its mountpoints.

Cheers,

-t

^ permalink raw reply

* Re: umount -a
From: Karel Zak @ 2011-08-08  8:54 UTC (permalink / raw)
  To: Bruce Dubbs; +Cc: util-linux
In-Reply-To: <4E387230.5060002@gmail.com>

On Tue, Aug 02, 2011 at 04:54:56PM -0500, Bruce Dubbs wrote:
> At linuxfromscratch, we've just made some changes to write bootscript  
> messages to /run/var.  This seems to work fine for us until shutdown 
> where
>
>   umaount -a
>
> unmounts /run which is mounted as a tmpfs.  We can certainly work around  
> the problem, but was wondering if this issue may also affect others.
>
> The man page for umount says:
>
>  -a     All of the file systems described in /etc/mtab are unmounted.
> (With umount version 2.7 and later: the proc filesystem is not
> unmounted.)
>
> Would it be reasonable to change umount -a to also omit /run if it is  
> mounted as a tmpfs?

 umount -a -t notmpfs  ?

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply

* [PATCH] correct trivial typo
From: Davidlohr Bueso @ 2011-08-08  3:16 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux

From: Davidlohr Bueso <dave@gnu.org>

Should say "failed to find" instead of "failed to found".

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
 lib/loopdev.c          |    2 +-
 libmount/src/context.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/loopdev.c b/lib/loopdev.c
index 0ef7136..fa3ad45 100644
--- a/lib/loopdev.c
+++ b/lib/loopdev.c
@@ -1063,7 +1063,7 @@ static int test_loop_setup(const char *filename, const char *device)
 		if (!device) {
 			rc = loopcxt_find_unused(&lc);
 			if (rc)
-				err(EXIT_FAILURE, "failed to found unused device");
+				err(EXIT_FAILURE, "failed to find unused device");
 			printf("Trying to use '%s'\n", loopcxt_get_device(&lc));
 		}
 
diff --git a/libmount/src/context.c b/libmount/src/context.c
index d9b3116..2210260 100644
--- a/libmount/src/context.c
+++ b/libmount/src/context.c
@@ -1549,7 +1549,7 @@ int mnt_context_apply_fstab(struct libmnt_context *cxt)
 			rc = apply_table(cxt, tab, MNT_ITER_BACKWARD);
 	}
 	if (rc)
-		DBG(CXT, mnt_debug_h(cxt, "failed to found entry in fstab/mtab"));
+		DBG(CXT, mnt_debug_h(cxt, "failed to find entry in fstab/mtab"));
 	return rc;
 }
 
-- 
1.7.4.1

^ permalink raw reply related

* Re: umount -a
From: Mike Frysinger @ 2011-08-08  0:35 UTC (permalink / raw)
  To: Bruce Dubbs; +Cc: util-linux
In-Reply-To: <4E387230.5060002@gmail.com>

[-- Attachment #1: Type: Text/Plain, Size: 663 bytes --]

On Tuesday, August 02, 2011 17:54:56 Bruce Dubbs wrote:
> At linuxfromscratch, we've just made some changes to write bootscript
> messages to /run/var.  This seems to work fine for us until shutdown where
> 
>    umaount -a
> 
> unmounts /run which is mounted as a tmpfs.  We can certainly work around
> the problem, but was wondering if this issue may also affect others.

you could make the same argument for /dev, but i dont think that gets handled 
specially either.  plus, there's the whole "will only work with recent util-
linux versions".  so it makes sense imo to have distro init code to deal with 
this regardless of anything else.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: [PATCH] Add a new documentation directory and move the README.devel file there.
From: Davidlohr Bueso @ 2011-08-07 16:05 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux
In-Reply-To: <1312677229.3408.2.camel@offbook>

ah, never mind, I didn't see Sami's patch.

On Sat, 2011-08-06 at 20:33 -0400, Davidlohr Bueso wrote:
> From: Davidlohr Bueso <dave@gnu.org>
> 
> Signed-off-by: Davidlohr Bueso <dave@gnu.org>
> ---
>  Documentation/README.devel |  121 ++++++++++++++++++++++++++++++++++++++++++++
>  README.devel               |  121 --------------------------------------------
>  2 files changed, 121 insertions(+), 121 deletions(-)
>  create mode 100644 Documentation/README.devel
>  delete mode 100644 README.devel
> 
> diff --git a/Documentation/README.devel b/Documentation/README.devel
> new file mode 100644
> index 0000000..d76baaf
> --- /dev/null
> +++ b/Documentation/README.devel
> @@ -0,0 +1,121 @@
> +
> + Notes for util-linux developers
> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +AUTOTOOLS:
> +
> +     * "./autogen.sh" generates all files needed to compile and install the code
> +       (run it after checkout from git)
> +
> +     * "make distclean" removes all unnecessary files, but the code can still be
> +       recompiled with "./configure; make"
> +
> +     * "make dist-gzip" (or -bzip2) creates a tarball that can be configured and
> +       compiled without running "./autogen.sh"
> +
> +
> +PATCHES:
> +
> +     * send your patches to the mailing list or to the upstream maintainer
> +       (see the AUTHORS and README files)
> +
> +     * diff -u
> +
> +     * don't include generated (autotools) stuff to your patches
> +       (hint: use git-clean [-X])
> +
> +     * patches are delivered via email only.  Downloading them from internet
> +       servers is a pain.
> +
> +     * one patch per email, with the changelog in the body of the email.
> +
> +     * many small patches are favoured over one big. Break down is done on
> +       basis of logical functionality; for example #endif mark ups, compiler
> +       warning and exit codes fixes all should be individual small patches.
> +
> +     * Subject: [PATCH] subsystem: description
> +
> +     * if someone else wrote the patch, they should be credited (and blamed)
> +       for it. To communicate this, add a line:
> +
> +          From: John Doe <jdoe@wherever.com>
> +
> +     * add a Signed-off-by line (hint: use "git commit -s")
> +
> +       The sign-off is a simple line at the end of the explanation for the
> +       patch, which certifies that you wrote it or otherwise have the right to
> +       pass it on as a open-source patch.  The rules are pretty simple: if you
> +       can certify the below:
> +
> +           By making a contribution to this project, I certify that:
> +
> +           (a) The contribution was created in whole or in part by me and I
> +               have the right to submit it under the open source license
> +               indicated in the file; or
> +
> +           (b) The contribution is based upon previous work that, to the best
> +               of my knowledge, is covered under an appropriate open source
> +               license and I have the right under that license to submit that
> +               work with modifications, whether created in whole or in part
> +               by me, under the same open source license (unless I am
> +               permitted to submit under a different license), as indicated
> +               in the file; or
> +
> +           (c) The contribution was provided directly to me by some other
> +               person who certified (a), (b) or (c) and I have not modified it.
> +
> +           (d) I understand and agree that this project and the contribution
> +               are public and that a record of the contribution (including all
> +               personal information I submit with it, including my sign-off) is
> +               maintained indefinitely and may be redistributed consistent with
> +               this project or the open source license(s) involved.
> +
> +       then you just add a line saying
> +
> +               Signed-off-by: Random J Developer <random@developer.example.org>
> +
> +       using your real name (sorry, no pseudonyms or anonymous contributions.)
> +
> +
> +     * for more details see:
> +
> +       The perfect patch
> +                http://userweb.kernel.org/~akpm/stuff/tpp.txt
> +
> +CODING STYLE:
> +
> +     * the preferred coding style is based on the linux kernel Documentation/CodingStyle.
> +       For more details see:
> +
> +       http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=Documentation/CodingStyle
> +
> +
> +SCM (source code management):
> +
> +     git clone git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git util-linux
> +
> +
> +    * maintenance (stable) branch
> +        - created for every <major>.<minor> release
> +        - branch name: stable/v<major>.<minor>
> +
> +    * bugfix branch
> +        - created for <major>.<minor>.<maint> release for critical/security bugs only
> +        - this branch is optional
> +        - branch name: stable/v<major>.<minor>.<maint>
> +
> +    * master branch
> +        - the status of this branch is: "it works for me". It means useful
> +          but not well tested patches.
> +        - it's source for occasional snapshots
> +        - for long-term development or invasive changes should be an active
> +          development forked into a separate branch (topic branches) from the
> +          tip of "master".
> +
> +    * A new tag object is created for:
> +        - every release, tag name: v<version>
> +
> +
> +    * KNOWN BUGS:
> +        - tag v2.13.1 is typo. Please, ignore this tag.
> +
> diff --git a/README.devel b/README.devel
> deleted file mode 100644
> index d76baaf..0000000
> --- a/README.devel
> +++ /dev/null
> @@ -1,121 +0,0 @@
> -
> - Notes for util-linux developers
> - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> -
> -AUTOTOOLS:
> -
> -     * "./autogen.sh" generates all files needed to compile and install the code
> -       (run it after checkout from git)
> -
> -     * "make distclean" removes all unnecessary files, but the code can still be
> -       recompiled with "./configure; make"
> -
> -     * "make dist-gzip" (or -bzip2) creates a tarball that can be configured and
> -       compiled without running "./autogen.sh"
> -
> -
> -PATCHES:
> -
> -     * send your patches to the mailing list or to the upstream maintainer
> -       (see the AUTHORS and README files)
> -
> -     * diff -u
> -
> -     * don't include generated (autotools) stuff to your patches
> -       (hint: use git-clean [-X])
> -
> -     * patches are delivered via email only.  Downloading them from internet
> -       servers is a pain.
> -
> -     * one patch per email, with the changelog in the body of the email.
> -
> -     * many small patches are favoured over one big. Break down is done on
> -       basis of logical functionality; for example #endif mark ups, compiler
> -       warning and exit codes fixes all should be individual small patches.
> -
> -     * Subject: [PATCH] subsystem: description
> -
> -     * if someone else wrote the patch, they should be credited (and blamed)
> -       for it. To communicate this, add a line:
> -
> -          From: John Doe <jdoe@wherever.com>
> -
> -     * add a Signed-off-by line (hint: use "git commit -s")
> -
> -       The sign-off is a simple line at the end of the explanation for the
> -       patch, which certifies that you wrote it or otherwise have the right to
> -       pass it on as a open-source patch.  The rules are pretty simple: if you
> -       can certify the below:
> -
> -           By making a contribution to this project, I certify that:
> -
> -           (a) The contribution was created in whole or in part by me and I
> -               have the right to submit it under the open source license
> -               indicated in the file; or
> -
> -           (b) The contribution is based upon previous work that, to the best
> -               of my knowledge, is covered under an appropriate open source
> -               license and I have the right under that license to submit that
> -               work with modifications, whether created in whole or in part
> -               by me, under the same open source license (unless I am
> -               permitted to submit under a different license), as indicated
> -               in the file; or
> -
> -           (c) The contribution was provided directly to me by some other
> -               person who certified (a), (b) or (c) and I have not modified it.
> -
> -           (d) I understand and agree that this project and the contribution
> -               are public and that a record of the contribution (including all
> -               personal information I submit with it, including my sign-off) is
> -               maintained indefinitely and may be redistributed consistent with
> -               this project or the open source license(s) involved.
> -
> -       then you just add a line saying
> -
> -               Signed-off-by: Random J Developer <random@developer.example.org>
> -
> -       using your real name (sorry, no pseudonyms or anonymous contributions.)
> -
> -
> -     * for more details see:
> -
> -       The perfect patch
> -                http://userweb.kernel.org/~akpm/stuff/tpp.txt
> -
> -CODING STYLE:
> -
> -     * the preferred coding style is based on the linux kernel Documentation/CodingStyle.
> -       For more details see:
> -
> -       http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=Documentation/CodingStyle
> -
> -
> -SCM (source code management):
> -
> -     git clone git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git util-linux
> -
> -
> -    * maintenance (stable) branch
> -        - created for every <major>.<minor> release
> -        - branch name: stable/v<major>.<minor>
> -
> -    * bugfix branch
> -        - created for <major>.<minor>.<maint> release for critical/security bugs only
> -        - this branch is optional
> -        - branch name: stable/v<major>.<minor>.<maint>
> -
> -    * master branch
> -        - the status of this branch is: "it works for me". It means useful
> -          but not well tested patches.
> -        - it's source for occasional snapshots
> -        - for long-term development or invasive changes should be an active
> -          development forked into a separate branch (topic branches) from the
> -          tip of "master".
> -
> -    * A new tag object is created for:
> -        - every release, tag name: v<version>
> -
> -
> -    * KNOWN BUGS:
> -        - tag v2.13.1 is typo. Please, ignore this tag.
> -



^ permalink raw reply

* [PATCH] Documentation: add debugging doc
From: Davidlohr Bueso @ 2011-08-07  0:59 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux

From: Davidlohr Bueso <dave@gnu.org>

Layout the base for tips on debugging util-linux programs/wrappers.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
 Documentation/README.debug |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/README.debug

diff --git a/Documentation/README.debug b/Documentation/README.debug
new file mode 100644
index 0000000..7ead12f
--- /dev/null
+++ b/Documentation/README.debug
@@ -0,0 +1,30 @@
+Debugging util-linux programs
+-----------------------------
+
+There are considerations to be made when profiling or debugging some programs found
+in the util-linux package. Because wrapper scripts are used for the binaries to make
+sure all library dependencies are met, you cannot use tools such as gdb or valgrind
+directly with them.
+
+Let's take for example the mount command:
+
+$> file /path/util-linux/mount/mount
+mount: Bourne-Again shell script text executable
+
+The binary itself is located in the .libs/ dir:
+
+$> file /path/util-linux/mount/.libs/mount
+mount: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped
+
+When this command is run, there's a library dependency error:
+./mount: /lib/x86_64-linux-gnu/libblkid.so.1: version `BLKID_2.20' not found (required by ./mount)
+
+To overcome this we need set the LD_LIBRARY_PATH variable to read the path of the shared lib found in
+the sources, and not system-wide:
+
+$> export LD_LIBRARY_PATH=/path/util-linux/libblkid/src/.libs/:$LD_LIBRARY_PATH
+
+Now external debugging tools can be run on the binary.
+
+Happy hacking!
+Davidlohr Bueso, August 2011
-- 
1.7.4.1

^ permalink raw reply related

* [PATCH] Add a new documentation directory and move the README.devel file there.
From: Davidlohr Bueso @ 2011-08-07  0:33 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux

From: Davidlohr Bueso <dave@gnu.org>

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
 Documentation/README.devel |  121 ++++++++++++++++++++++++++++++++++++++++++++
 README.devel               |  121 --------------------------------------------
 2 files changed, 121 insertions(+), 121 deletions(-)
 create mode 100644 Documentation/README.devel
 delete mode 100644 README.devel

diff --git a/Documentation/README.devel b/Documentation/README.devel
new file mode 100644
index 0000000..d76baaf
--- /dev/null
+++ b/Documentation/README.devel
@@ -0,0 +1,121 @@
+
+ Notes for util-linux developers
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+AUTOTOOLS:
+
+     * "./autogen.sh" generates all files needed to compile and install the code
+       (run it after checkout from git)
+
+     * "make distclean" removes all unnecessary files, but the code can still be
+       recompiled with "./configure; make"
+
+     * "make dist-gzip" (or -bzip2) creates a tarball that can be configured and
+       compiled without running "./autogen.sh"
+
+
+PATCHES:
+
+     * send your patches to the mailing list or to the upstream maintainer
+       (see the AUTHORS and README files)
+
+     * diff -u
+
+     * don't include generated (autotools) stuff to your patches
+       (hint: use git-clean [-X])
+
+     * patches are delivered via email only.  Downloading them from internet
+       servers is a pain.
+
+     * one patch per email, with the changelog in the body of the email.
+
+     * many small patches are favoured over one big. Break down is done on
+       basis of logical functionality; for example #endif mark ups, compiler
+       warning and exit codes fixes all should be individual small patches.
+
+     * Subject: [PATCH] subsystem: description
+
+     * if someone else wrote the patch, they should be credited (and blamed)
+       for it. To communicate this, add a line:
+
+          From: John Doe <jdoe@wherever.com>
+
+     * add a Signed-off-by line (hint: use "git commit -s")
+
+       The sign-off is a simple line at the end of the explanation for the
+       patch, which certifies that you wrote it or otherwise have the right to
+       pass it on as a open-source patch.  The rules are pretty simple: if you
+       can certify the below:
+
+           By making a contribution to this project, I certify that:
+
+           (a) The contribution was created in whole or in part by me and I
+               have the right to submit it under the open source license
+               indicated in the file; or
+
+           (b) The contribution is based upon previous work that, to the best
+               of my knowledge, is covered under an appropriate open source
+               license and I have the right under that license to submit that
+               work with modifications, whether created in whole or in part
+               by me, under the same open source license (unless I am
+               permitted to submit under a different license), as indicated
+               in the file; or
+
+           (c) The contribution was provided directly to me by some other
+               person who certified (a), (b) or (c) and I have not modified it.
+
+           (d) I understand and agree that this project and the contribution
+               are public and that a record of the contribution (including all
+               personal information I submit with it, including my sign-off) is
+               maintained indefinitely and may be redistributed consistent with
+               this project or the open source license(s) involved.
+
+       then you just add a line saying
+
+               Signed-off-by: Random J Developer <random@developer.example.org>
+
+       using your real name (sorry, no pseudonyms or anonymous contributions.)
+
+
+     * for more details see:
+
+       The perfect patch
+                http://userweb.kernel.org/~akpm/stuff/tpp.txt
+
+CODING STYLE:
+
+     * the preferred coding style is based on the linux kernel Documentation/CodingStyle.
+       For more details see:
+
+       http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=Documentation/CodingStyle
+
+
+SCM (source code management):
+
+     git clone git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git util-linux
+
+
+    * maintenance (stable) branch
+        - created for every <major>.<minor> release
+        - branch name: stable/v<major>.<minor>
+
+    * bugfix branch
+        - created for <major>.<minor>.<maint> release for critical/security bugs only
+        - this branch is optional
+        - branch name: stable/v<major>.<minor>.<maint>
+
+    * master branch
+        - the status of this branch is: "it works for me". It means useful
+          but not well tested patches.
+        - it's source for occasional snapshots
+        - for long-term development or invasive changes should be an active
+          development forked into a separate branch (topic branches) from the
+          tip of "master".
+
+    * A new tag object is created for:
+        - every release, tag name: v<version>
+
+
+    * KNOWN BUGS:
+        - tag v2.13.1 is typo. Please, ignore this tag.
+
diff --git a/README.devel b/README.devel
deleted file mode 100644
index d76baaf..0000000
--- a/README.devel
+++ /dev/null
@@ -1,121 +0,0 @@
-
- Notes for util-linux developers
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-AUTOTOOLS:
-
-     * "./autogen.sh" generates all files needed to compile and install the code
-       (run it after checkout from git)
-
-     * "make distclean" removes all unnecessary files, but the code can still be
-       recompiled with "./configure; make"
-
-     * "make dist-gzip" (or -bzip2) creates a tarball that can be configured and
-       compiled without running "./autogen.sh"
-
-
-PATCHES:
-
-     * send your patches to the mailing list or to the upstream maintainer
-       (see the AUTHORS and README files)
-
-     * diff -u
-
-     * don't include generated (autotools) stuff to your patches
-       (hint: use git-clean [-X])
-
-     * patches are delivered via email only.  Downloading them from internet
-       servers is a pain.
-
-     * one patch per email, with the changelog in the body of the email.
-
-     * many small patches are favoured over one big. Break down is done on
-       basis of logical functionality; for example #endif mark ups, compiler
-       warning and exit codes fixes all should be individual small patches.
-
-     * Subject: [PATCH] subsystem: description
-
-     * if someone else wrote the patch, they should be credited (and blamed)
-       for it. To communicate this, add a line:
-
-          From: John Doe <jdoe@wherever.com>
-
-     * add a Signed-off-by line (hint: use "git commit -s")
-
-       The sign-off is a simple line at the end of the explanation for the
-       patch, which certifies that you wrote it or otherwise have the right to
-       pass it on as a open-source patch.  The rules are pretty simple: if you
-       can certify the below:
-
-           By making a contribution to this project, I certify that:
-
-           (a) The contribution was created in whole or in part by me and I
-               have the right to submit it under the open source license
-               indicated in the file; or
-
-           (b) The contribution is based upon previous work that, to the best
-               of my knowledge, is covered under an appropriate open source
-               license and I have the right under that license to submit that
-               work with modifications, whether created in whole or in part
-               by me, under the same open source license (unless I am
-               permitted to submit under a different license), as indicated
-               in the file; or
-
-           (c) The contribution was provided directly to me by some other
-               person who certified (a), (b) or (c) and I have not modified it.
-
-           (d) I understand and agree that this project and the contribution
-               are public and that a record of the contribution (including all
-               personal information I submit with it, including my sign-off) is
-               maintained indefinitely and may be redistributed consistent with
-               this project or the open source license(s) involved.
-
-       then you just add a line saying
-
-               Signed-off-by: Random J Developer <random@developer.example.org>
-
-       using your real name (sorry, no pseudonyms or anonymous contributions.)
-
-
-     * for more details see:
-
-       The perfect patch
-                http://userweb.kernel.org/~akpm/stuff/tpp.txt
-
-CODING STYLE:
-
-     * the preferred coding style is based on the linux kernel Documentation/CodingStyle.
-       For more details see:
-
-       http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=Documentation/CodingStyle
-
-
-SCM (source code management):
-
-     git clone git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git util-linux
-
-
-    * maintenance (stable) branch
-        - created for every <major>.<minor> release
-        - branch name: stable/v<major>.<minor>
-
-    * bugfix branch
-        - created for <major>.<minor>.<maint> release for critical/security bugs only
-        - this branch is optional
-        - branch name: stable/v<major>.<minor>.<maint>
-
-    * master branch
-        - the status of this branch is: "it works for me". It means useful
-          but not well tested patches.
-        - it's source for occasional snapshots
-        - for long-term development or invasive changes should be an active
-          development forked into a separate branch (topic branches) from the
-          tip of "master".
-
-    * A new tag object is created for:
-        - every release, tag name: v<version>
-
-
-    * KNOWN BUGS:
-        - tag v2.13.1 is typo. Please, ignore this tag.
-
-- 
1.7.4.1




^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox