diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2012-11-10 11:42:42 +0000 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2012-11-14 23:00:16 +0100 |
commit | 9f0c314674cb8f9d79d30540359d1df7f564d37e (patch) | |
tree | 49a314d978c8d5b55499676bdf0570661dbc7ef4 /package/nfs-utils/nfs-utils-0003-Switch-legacy-index-in-favour-of-strchr.patch | |
parent | c54af0a294de09ecb8699d0d9a0fca8b39247a79 (diff) | |
download | buildroot-novena-9f0c314674cb8f9d79d30540359d1df7f564d37e.tar.gz buildroot-novena-9f0c314674cb8f9d79d30540359d1df7f564d37e.zip |
nfs-utils: reformat patch set as git patches
As we will need to add more patches to nfs-utils, we need a correct
ordering when applying patches. Therefore, reformat the patches to use
a git format and git naming.
The nfs-utils-dont-mix-flags.patch is no longer needed as it was
patching Makefile.in files that were being regenerated due to the
package having _AUTORECONF = YES. The Makefile.in are properly
regenerated thanks to the nfs-utils-0002-Patch-taken-from-Gentoo.patch
patch.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/nfs-utils/nfs-utils-0003-Switch-legacy-index-in-favour-of-strchr.patch')
-rw-r--r-- | package/nfs-utils/nfs-utils-0003-Switch-legacy-index-in-favour-of-strchr.patch | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/package/nfs-utils/nfs-utils-0003-Switch-legacy-index-in-favour-of-strchr.patch b/package/nfs-utils/nfs-utils-0003-Switch-legacy-index-in-favour-of-strchr.patch new file mode 100644 index 000000000..82a6c4365 --- /dev/null +++ b/package/nfs-utils/nfs-utils-0003-Switch-legacy-index-in-favour-of-strchr.patch @@ -0,0 +1,73 @@ +From 636e78e4c9bc8be174805bde2f3ae7f940dc3d0e Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias <gustavo@zacarias.com.ar> +Date: Sat, 10 Nov 2012 18:58:15 +0100 +Subject: [PATCH] Switch legacy index() in favour of strchr() Updated for + 1.2.6 from the previous patch by Frederik Pasch. + +Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> +--- + support/nfs/nfs_mntent.c | 6 +++--- + utils/mount/error.c | 2 +- + utils/mountd/fsloc.c | 2 +- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/support/nfs/nfs_mntent.c b/support/nfs/nfs_mntent.c +index a2118a2..7496ed6 100644 +--- a/support/nfs/nfs_mntent.c ++++ b/support/nfs/nfs_mntent.c +@@ -9,7 +9,7 @@ + */ + + #include <stdio.h> +-#include <string.h> /* for index */ ++#include <string.h> /* for strchr */ + #include <ctype.h> /* for isdigit */ + #include <sys/stat.h> /* for umask */ + #include <unistd.h> /* for ftruncate */ +@@ -172,7 +172,7 @@ nfs_getmntent (mntFILE *mfp) { + return NULL; + + mfp->mntent_lineno++; +- s = index (buf, '\n'); ++ s = strchr (buf, '\n'); + if (s == NULL) { + /* Missing final newline? Otherwise extremely */ + /* long line - assume file was corrupted */ +@@ -180,7 +180,7 @@ nfs_getmntent (mntFILE *mfp) { + fprintf(stderr, _("[mntent]: warning: no final " + "newline at the end of %s\n"), + mfp->mntent_file); +- s = index (buf, 0); ++ s = strchr (buf, 0); + } else { + mfp->mntent_errs = 1; + goto err; +diff --git a/utils/mount/error.c b/utils/mount/error.c +index 83ad1d2..428deef 100644 +--- a/utils/mount/error.c ++++ b/utils/mount/error.c +@@ -62,7 +62,7 @@ static int rpc_strerror(int spos) + char *tmp; + + if (estr) { +- if ((ptr = index(estr, ':'))) ++ if ((ptr = strchr(estr, ':'))) + estr = ++ptr; + + tmp = &errbuf[spos]; +diff --git a/utils/mountd/fsloc.c b/utils/mountd/fsloc.c +index bc737d1..ddbe92f 100644 +--- a/utils/mountd/fsloc.c ++++ b/utils/mountd/fsloc.c +@@ -127,7 +127,7 @@ static struct servers *method_list(char *data) + bool v6esc = false; + + xlog(L_NOTICE, "method_list(%s)", data); +- for (ptr--, listsize=1; ptr; ptr=index(ptr, ':'), listsize++) ++ for (ptr--, listsize=1; ptr; ptr=strchr(ptr, ':'), listsize++) + ptr++; + list = malloc(listsize * sizeof(char *)); + copy = strdup(data); +-- +1.7.9.5 + |