diff options
author | Davidlohr Bueso <dave@gnu.org> | 2010-11-16 10:47:35 -0300 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2010-11-23 21:06:49 +0100 |
commit | 8abcf2900297c6d53ead867c42f7c1688e8d52ca (patch) | |
tree | 77e2d666cd76d9d4c37e1c1864415c1e52d37926 /misc-utils | |
parent | e8fc977aba09ddbd89b25276fd777c3f0eef9299 (diff) | |
download | util-linux-old-8abcf2900297c6d53ead867c42f7c1688e8d52ca.tar.gz |
lib: [strutils] general purpose string handling functions
This patch replaces a few functions used throughout the source:
* Renames getnum (from schedutils) to strtol_or_err
* Moves strtosize (from lib/strtosize.c)
* Moves xstrncpy (from include/xstrncpy.h)
* Adds strnlen, strnchr and strndup if not available (remove it from libmount utils)
A few Makefile.am files were modified to compile accordingly along with trivial renaming
in schedutils source code.
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Diffstat (limited to 'misc-utils')
-rw-r--r-- | misc-utils/Makefile.am | 4 | ||||
-rw-r--r-- | misc-utils/blkid.c | 2 | ||||
-rw-r--r-- | misc-utils/wipefs.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/misc-utils/Makefile.am b/misc-utils/Makefile.am index aed8bac8..76b69fa4 100644 --- a/misc-utils/Makefile.am +++ b/misc-utils/Makefile.am @@ -37,12 +37,12 @@ if BUILD_LIBBLKID sbin_PROGRAMS += blkid findfs wipefs dist_man_MANS += blkid.8 findfs.8 wipefs.8 blkid_SOURCES = blkid.c $(top_srcdir)/lib/ismounted.c \ - $(top_srcdir)/lib/strtosize.c + $(top_srcdir)/lib/strutils.c blkid_LDADD = $(ul_libblkid_la) blkid_CFLAGS = $(AM_CFLAGS) -I$(ul_libblkid_incdir) findfs_LDADD = $(ul_libblkid_la) findfs_CFLAGS = $(AM_CFLAGS) -I$(ul_libblkid_incdir) -wipefs_SOURCES = wipefs.c $(top_srcdir)/lib/strtosize.c +wipefs_SOURCES = wipefs.c $(top_srcdir)/lib/strutils.c wipefs_LDADD = $(ul_libblkid_la) wipefs_CFLAGS = $(AM_CFLAGS) -I$(ul_libblkid_incdir) if HAVE_STATIC_BLKID diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c index f94df06a..2f7860fd 100644 --- a/misc-utils/blkid.c +++ b/misc-utils/blkid.c @@ -41,7 +41,7 @@ extern int optind; #include <blkid.h> #include "ismounted.h" -#include "strtosize.h" +#include "strutils.h" const char *progname = "blkid"; diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c index dbfabc4a..2f223f0c 100644 --- a/misc-utils/wipefs.c +++ b/misc-utils/wipefs.c @@ -35,7 +35,7 @@ #include "nls.h" #include "xalloc.h" -#include "strtosize.h" +#include "strutils.h" struct wipe_desc { loff_t offset; /* magic string offset */ |