aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-01-16 09:26:50 -0600
committerRob Landley <rob@landley.net>2014-01-16 09:26:50 -0600
commit59d85e2bb065a3bdc27868acb7a65f89d872c7fa (patch)
tree25db9183f6e142b7c5f12b69e9728aaa98f5bbd6 /toys/posix
parent2ded83376cb822198e83048335417a0e870f2240 (diff)
downloadtoybox-59d85e2bb065a3bdc27868acb7a65f89d872c7fa.tar.gz
Rename xmsprintf() to just xmprintf().
Partly because there's no supplied target string ala sprintf, and partly because I can never remember what order the m and s go in.
Diffstat (limited to 'toys/posix')
-rw-r--r--toys/posix/cp.c4
-rw-r--r--toys/posix/ln.c2
-rw-r--r--toys/posix/nohup.c2
-rw-r--r--toys/posix/split.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/toys/posix/cp.c b/toys/posix/cp.c
index 088f224d..817a0c62 100644
--- a/toys/posix/cp.c
+++ b/toys/posix/cp.c
@@ -176,7 +176,7 @@ int cp_node(struct dirtree *try)
if (*or->name == '/') dotdots = 0;
if (dotdots) {
- char *s2 = xmsprintf("% *c%s", 3*dotdots, ' ', s);
+ char *s2 = xmprintf("% *c%s", 3*dotdots, ' ', s);
free(s);
s = s2;
while(dotdots--) {
@@ -275,7 +275,7 @@ void cp_main(void)
char *src = toys.optargs[i];
int rc = 1;
- if (destdir) TT.destname = xmsprintf("%s/%s", destname, basename(src));
+ if (destdir) TT.destname = xmprintf("%s/%s", destname, basename(src));
else TT.destname = destname;
errno = EXDEV;
diff --git a/toys/posix/ln.c b/toys/posix/ln.c
index 3c94e721..d8f4ce62 100644
--- a/toys/posix/ln.c
+++ b/toys/posix/ln.c
@@ -48,7 +48,7 @@ void ln_main(void)
int rc;
char *try = toys.optargs[i];
- if (S_ISDIR(buf.st_mode)) new = xmsprintf("%s/%s", dest, basename(try));
+ if (S_ISDIR(buf.st_mode)) new = xmprintf("%s/%s", dest, basename(try));
else new = dest;
// Silently unlink the existing target (if any)
if (toys.optflags & FLAG_f) unlink(new);
diff --git a/toys/posix/nohup.c b/toys/posix/nohup.c
index e4354554..42d0e116 100644
--- a/toys/posix/nohup.c
+++ b/toys/posix/nohup.c
@@ -28,7 +28,7 @@ void nohup_main(void)
S_IRUSR|S_IWUSR ))
{
char *temp = getenv("HOME");
- temp = xmsprintf("%s/%s", temp ? temp : "", "nohup.out");
+ temp = xmprintf("%s/%s", temp ? temp : "", "nohup.out");
xcreate(temp, O_CREAT|O_APPEND|O_WRONLY, S_IRUSR|S_IWUSR);
}
}
diff --git a/toys/posix/split.c b/toys/posix/split.c
index f80527d9..d9a556b8 100644
--- a/toys/posix/split.c
+++ b/toys/posix/split.c
@@ -100,7 +100,7 @@ void split_main(void)
if (!TT.bytes && !TT.lines) TT.lines = 1000;
// Allocate template for output filenames
- TT.outfile = xmsprintf("%s% *c", (toys.optc == 2) ? toys.optargs[1] : "x",
+ TT.outfile = xmprintf("%s% *c", (toys.optc == 2) ? toys.optargs[1] : "x",
(int)TT.suflen, ' ');
// We only ever use one input, but this handles '-' or no input for us.