aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2017-11-03 14:16:08 +0000
committerRon Yorston <rmy@pobox.com>2017-11-03 14:16:08 +0000
commitd6ce08aeb85b3698ddaa281016b70e16aeb9fb35 (patch)
tree02ad9bc0684859515fe891f3d6b0a1086e0db156 /coreutils
parentab450021a99ba66126cc6d668fb06ec3829a572b (diff)
parenta5060b8364faa7c677c8950f1315c451403b0660 (diff)
downloadbusybox-w32-d6ce08aeb85b3698ddaa281016b70e16aeb9fb35.tar.gz
busybox-w32-d6ce08aeb85b3698ddaa281016b70e16aeb9fb35.tar.bz2
busybox-w32-d6ce08aeb85b3698ddaa281016b70e16aeb9fb35.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/basename.c1
-rw-r--r--coreutils/date.c7
-rw-r--r--coreutils/df.c6
-rw-r--r--coreutils/fold.c21
-rw-r--r--coreutils/libcoreutils/coreutils.h1
-rw-r--r--coreutils/libcoreutils/cp_mv_stat.c2
-rw-r--r--coreutils/libcoreutils/getopt_mk_fifo_nod.c2
-rw-r--r--coreutils/md5_sha1_sum.c4
-rw-r--r--coreutils/mktemp.c2
-rw-r--r--coreutils/nohup.c3
-rw-r--r--coreutils/printf.c71
-rw-r--r--coreutils/realpath.c3
-rw-r--r--coreutils/stty.c39
-rw-r--r--coreutils/tr.c2
-rw-r--r--coreutils/uname.c3
-rw-r--r--coreutils/unlink.c3
-rw-r--r--coreutils/uuencode.c6
-rw-r--r--coreutils/who.c4
18 files changed, 87 insertions, 93 deletions
diff --git a/coreutils/basename.c b/coreutils/basename.c
index 566aeebda..812a5e63e 100644
--- a/coreutils/basename.c
+++ b/coreutils/basename.c
@@ -6,7 +6,6 @@
6 * 6 *
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9
10/* Mar 16, 2003 Manuel Novoa III (mjn3@codepoet.org) 9/* Mar 16, 2003 Manuel Novoa III (mjn3@codepoet.org)
11 * 10 *
12 * Changes: 11 * Changes:
diff --git a/coreutils/date.c b/coreutils/date.c
index 5b15ce778..87dc3bbd0 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -36,8 +36,8 @@
36//config:# defaults to "no": stat's nanosecond field is a bit non-portable 36//config:# defaults to "no": stat's nanosecond field is a bit non-portable
37//config:config FEATURE_DATE_NANO 37//config:config FEATURE_DATE_NANO
38//config: bool "Support %[num]N nanosecond format specifier" 38//config: bool "Support %[num]N nanosecond format specifier"
39//config: default n 39//config: default n # syscall(__NR_clock_gettime)
40//config: depends on DATE # syscall(__NR_clock_gettime) 40//config: depends on DATE
41//config: select PLATFORM_LINUX 41//config: select PLATFORM_LINUX
42//config: help 42//config: help
43//config: Support %[num]N format specifier. Adds ~250 bytes of code. 43//config: Support %[num]N format specifier. Adds ~250 bytes of code.
@@ -203,6 +203,7 @@ int date_main(int argc UNUSED_PARAM, char **argv)
203 IF_FEATURE_DATE_ISOFMT(, &isofmt_arg, &fmt_str2dt) 203 IF_FEATURE_DATE_ISOFMT(, &isofmt_arg, &fmt_str2dt)
204 ); 204 );
205 argv += optind; 205 argv += optind;
206
206 maybe_set_utc(opt); 207 maybe_set_utc(opt);
207 208
208 if (ENABLE_FEATURE_DATE_ISOFMT && (opt & OPT_TIMESPEC)) { 209 if (ENABLE_FEATURE_DATE_ISOFMT && (opt & OPT_TIMESPEC)) {
@@ -301,8 +302,6 @@ int date_main(int argc UNUSED_PARAM, char **argv)
301 tm_time.tm_isdst = -1; 302 tm_time.tm_isdst = -1;
302 ts.tv_sec = validate_tm_time(date_str, &tm_time); 303 ts.tv_sec = validate_tm_time(date_str, &tm_time);
303 304
304 maybe_set_utc(opt);
305
306 /* if setting time, set it */ 305 /* if setting time, set it */
307 if ((opt & OPT_SET) && stime(&ts.tv_sec) < 0) { 306 if ((opt & OPT_SET) && stime(&ts.tv_sec) < 0) {
308 bb_perror_msg("can't set date"); 307 bb_perror_msg("can't set date");
diff --git a/coreutils/df.c b/coreutils/df.c
index 121da970b..4076b5fec 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -77,7 +77,7 @@
77//usage: "/dev/sda3 17381728 17107080 274648 98% /\n" 77//usage: "/dev/sda3 17381728 17107080 274648 98% /\n"
78 78
79#include <mntent.h> 79#include <mntent.h>
80#include <sys/vfs.h> 80#include <sys/statvfs.h>
81#include "libbb.h" 81#include "libbb.h"
82#include "unicode.h" 82#include "unicode.h"
83 83
@@ -98,7 +98,7 @@ int df_main(int argc UNUSED_PARAM, char **argv)
98 unsigned opt; 98 unsigned opt;
99 FILE *mount_table; 99 FILE *mount_table;
100 struct mntent *mount_entry; 100 struct mntent *mount_entry;
101 struct statfs s; 101 struct statvfs s;
102 102
103 enum { 103 enum {
104 OPT_KILO = (1 << 0), 104 OPT_KILO = (1 << 0),
@@ -211,7 +211,7 @@ int df_main(int argc UNUSED_PARAM, char **argv)
211 mount_point = mount_entry->mnt_dir; 211 mount_point = mount_entry->mnt_dir;
212 fs_type = mount_entry->mnt_type; 212 fs_type = mount_entry->mnt_type;
213 213
214 if (statfs(mount_point, &s) != 0) { 214 if (statvfs(mount_point, &s) != 0) {
215 bb_simple_perror_msg(mount_point); 215 bb_simple_perror_msg(mount_point);
216 goto set_error; 216 goto set_error;
217 } 217 }
diff --git a/coreutils/fold.c b/coreutils/fold.c
index 286db228d..1e26dde0c 100644
--- a/coreutils/fold.c
+++ b/coreutils/fold.c
@@ -1,14 +1,15 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* fold -- wrap each input line to fit in specified width. 2/*
3 3 * fold -- wrap each input line to fit in specified width.
4 Written by David MacKenzie, djm@gnu.ai.mit.edu. 4 *
5 Copyright (C) 91, 1995-2002 Free Software Foundation, Inc. 5 * Written by David MacKenzie, djm@gnu.ai.mit.edu.
6 6 * Copyright (C) 91, 1995-2002 Free Software Foundation, Inc.
7 Modified for busybox based on coreutils v 5.0 7 *
8 Copyright (C) 2003 Glenn McGrath 8 * Modified for busybox based on coreutils v 5.0
9 9 * Copyright (C) 2003 Glenn McGrath
10 Licensed under GPLv2 or later, see file LICENSE in this source tree. 10 *
11*/ 11 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
12 */
12//config:config FOLD 13//config:config FOLD
13//config: bool "fold (4.6 kb)" 14//config: bool "fold (4.6 kb)"
14//config: default y 15//config: default y
diff --git a/coreutils/libcoreutils/coreutils.h b/coreutils/libcoreutils/coreutils.h
index 307d0330a..ad102e423 100644
--- a/coreutils/libcoreutils/coreutils.h
+++ b/coreutils/libcoreutils/coreutils.h
@@ -2,7 +2,6 @@
2/* 2/*
3 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 3 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
4 */ 4 */
5
6#ifndef COREUTILS_H 5#ifndef COREUTILS_H
7#define COREUTILS_H 1 6#define COREUTILS_H 1
8 7
diff --git a/coreutils/libcoreutils/cp_mv_stat.c b/coreutils/libcoreutils/cp_mv_stat.c
index 5ba07ecc3..26c0e1645 100644
--- a/coreutils/libcoreutils/cp_mv_stat.c
+++ b/coreutils/libcoreutils/cp_mv_stat.c
@@ -17,9 +17,7 @@
17 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 */ 20 */
22
23#include "libbb.h" 21#include "libbb.h"
24#include "coreutils.h" 22#include "coreutils.h"
25 23
diff --git a/coreutils/libcoreutils/getopt_mk_fifo_nod.c b/coreutils/libcoreutils/getopt_mk_fifo_nod.c
index 47375ff91..dafe70edf 100644
--- a/coreutils/libcoreutils/getopt_mk_fifo_nod.c
+++ b/coreutils/libcoreutils/getopt_mk_fifo_nod.c
@@ -17,9 +17,7 @@
17 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 */ 20 */
22
23#include "libbb.h" 21#include "libbb.h"
24#include "coreutils.h" 22#include "coreutils.h"
25 23
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c
index 89d6cec0b..ccdfd6855 100644
--- a/coreutils/md5_sha1_sum.c
+++ b/coreutils/md5_sha1_sum.c
@@ -1,7 +1,7 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * Copyright (C) 2003 Glenn L. McGrath 3 * Copyright (C) 2003 Glenn L. McGrath
4 * Copyright (C) 2003-2004 Erik Andersen 4 * Copyright (C) 2003-2004 Erik Andersen
5 * 5 *
6 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 6 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
7 */ 7 */
diff --git a/coreutils/mktemp.c b/coreutils/mktemp.c
index d4ff883fa..c041fedf7 100644
--- a/coreutils/mktemp.c
+++ b/coreutils/mktemp.c
@@ -2,13 +2,11 @@
2/* 2/*
3 * Mini mktemp implementation for busybox 3 * Mini mktemp implementation for busybox
4 * 4 *
5 *
6 * Copyright (C) 2000 by Daniel Jacobowitz 5 * Copyright (C) 2000 by Daniel Jacobowitz
7 * Written by Daniel Jacobowitz <dan@debian.org> 6 * Written by Daniel Jacobowitz <dan@debian.org>
8 * 7 *
9 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
10 */ 9 */
11
12/* Coreutils 6.12 man page says: 10/* Coreutils 6.12 man page says:
13 * mktemp [OPTION]... [TEMPLATE] 11 * mktemp [OPTION]... [TEMPLATE]
14 * Create a temporary file or directory, safely, and print its name. If 12 * Create a temporary file or directory, safely, and print its name. If
diff --git a/coreutils/nohup.c b/coreutils/nohup.c
index 8a70ec4df..ae136e085 100644
--- a/coreutils/nohup.c
+++ b/coreutils/nohup.c
@@ -1,5 +1,6 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* nohup - invoke a utility immune to hangups. 2/*
3 * nohup - invoke a utility immune to hangups.
3 * 4 *
4 * Busybox version based on nohup specification at 5 * Busybox version based on nohup specification at
5 * http://www.opengroup.org/onlinepubs/007904975/utilities/nohup.html 6 * http://www.opengroup.org/onlinepubs/007904975/utilities/nohup.html
diff --git a/coreutils/printf.c b/coreutils/printf.c
index 353cfc608..a666ff7ac 100644
--- a/coreutils/printf.c
+++ b/coreutils/printf.c
@@ -1,41 +1,40 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* printf - format and print data 2/*
3 3 * printf - format and print data
4 Copyright 1999 Dave Cinege 4 *
5 Portions copyright (C) 1990-1996 Free Software Foundation, Inc. 5 * Copyright 1999 Dave Cinege
6 6 * Portions copyright (C) 1990-1996 Free Software Foundation, Inc.
7 Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 *
8*/ 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 9 */
10/* Usage: printf format [argument...] 10/* Usage: printf format [argument...]
11 11 *
12 A front end to the printf function that lets it be used from the shell. 12 * A front end to the printf function that lets it be used from the shell.
13 13 *
14 Backslash escapes: 14 * Backslash escapes:
15 15 *
16 \" = double quote 16 * \" = double quote
17 \\ = backslash 17 * \\ = backslash
18 \a = alert (bell) 18 * \a = alert (bell)
19 \b = backspace 19 * \b = backspace
20 \c = produce no further output 20 * \c = produce no further output
21 \f = form feed 21 * \f = form feed
22 \n = new line 22 * \n = new line
23 \r = carriage return 23 * \r = carriage return
24 \t = horizontal tab 24 * \t = horizontal tab
25 \v = vertical tab 25 * \v = vertical tab
26 \0ooo = octal number (ooo is 0 to 3 digits) 26 * \0ooo = octal number (ooo is 0 to 3 digits)
27 \xhhh = hexadecimal number (hhh is 1 to 3 digits) 27 * \xhhh = hexadecimal number (hhh is 1 to 3 digits)
28 28 *
29 Additional directive: 29 * Additional directive:
30 30 *
31 %b = print an argument string, interpreting backslash escapes 31 * %b = print an argument string, interpreting backslash escapes
32 32 *
33 The 'format' argument is re-used as many times as necessary 33 * The 'format' argument is re-used as many times as necessary
34 to convert all of the given arguments. 34 * to convert all of the given arguments.
35 35 *
36 David MacKenzie <djm@gnu.ai.mit.edu> 36 * David MacKenzie <djm@gnu.ai.mit.edu>
37*/ 37 */
38
39/* 19990508 Busy Boxed! Dave Cinege */ 38/* 19990508 Busy Boxed! Dave Cinege */
40 39
41//config:config PRINTF 40//config:config PRINTF
diff --git a/coreutils/realpath.c b/coreutils/realpath.c
index f9c630135..aa878fcd2 100644
--- a/coreutils/realpath.c
+++ b/coreutils/realpath.c
@@ -1,5 +1,6 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* Mar 16, 2003 Manuel Novoa III (mjn3@codepoet.org) 2/*
3 * Mar 16, 2003 Manuel Novoa III (mjn3@codepoet.org)
3 * 4 *
4 * Now does proper error checking on output and returns a failure exit code 5 * Now does proper error checking on output and returns a failure exit code
5 * if one or more paths cannot be resolved. 6 * if one or more paths cannot be resolved.
diff --git a/coreutils/stty.c b/coreutils/stty.c
index b6e836364..424d909cf 100644
--- a/coreutils/stty.c
+++ b/coreutils/stty.c
@@ -1,24 +1,25 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* stty -- change and print terminal line settings 2/*
3 Copyright (C) 1990-1999 Free Software Foundation, Inc. 3 * stty -- change and print terminal line settings
4 4 * Copyright (C) 1990-1999 Free Software Foundation, Inc.
5 Licensed under GPLv2 or later, see file LICENSE in this source tree. 5 *
6*/ 6 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
7 */
7/* Usage: stty [-ag] [-F device] [setting...] 8/* Usage: stty [-ag] [-F device] [setting...]
8 9 *
9 Options: 10 * Options:
10 -a Write all current settings to stdout in human-readable form. 11 * -a Write all current settings to stdout in human-readable form.
11 -g Write all current settings to stdout in stty-readable form. 12 * -g Write all current settings to stdout in stty-readable form.
12 -F Open and use the specified device instead of stdin 13 * -F Open and use the specified device instead of stdin
13 14 *
14 If no args are given, write to stdout the baud rate and settings that 15 * If no args are given, write to stdout the baud rate and settings that
15 have been changed from their defaults. Mode reading and changes 16 * have been changed from their defaults. Mode reading and changes
16 are done on the specified device, or stdin if none was specified. 17 * are done on the specified device, or stdin if none was specified.
17 18 *
18 David MacKenzie <djm@gnu.ai.mit.edu> 19 * David MacKenzie <djm@gnu.ai.mit.edu>
19 20 *
20 Special for busybox ported by Vladimir Oleynik <dzo@simtreas.ru> 2001 21 * Special for busybox ported by Vladimir Oleynik <dzo@simtreas.ru> 2001
21*/ 22 */
22//config:config STTY 23//config:config STTY
23//config: bool "stty (8.6 kb)" 24//config: bool "stty (8.6 kb)"
24//config: default y 25//config: default y
diff --git a/coreutils/tr.c b/coreutils/tr.c
index c5872434a..10284e1c9 100644
--- a/coreutils/tr.c
+++ b/coreutils/tr.c
@@ -2,7 +2,7 @@
2/* 2/*
3 * Mini tr implementation for busybox 3 * Mini tr implementation for busybox
4 * 4 *
5 ** Copyright (c) 1987,1997, Prentice Hall All rights reserved. 5 * Copyright (c) 1987,1997, Prentice Hall All rights reserved.
6 * 6 *
7 * The name of Prentice Hall may not be used to endorse or promote 7 * The name of Prentice Hall may not be used to endorse or promote
8 * products derived from this software without specific prior 8 * products derived from this software without specific prior
diff --git a/coreutils/uname.c b/coreutils/uname.c
index bb2d1fe8d..57039b1bf 100644
--- a/coreutils/uname.c
+++ b/coreutils/uname.c
@@ -1,5 +1,6 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* uname -- print system information 2/*
3 * uname -- print system information
3 * Copyright (C) 1989-1999 Free Software Foundation, Inc. 4 * Copyright (C) 1989-1999 Free Software Foundation, Inc.
4 * 5 *
5 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 6 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
diff --git a/coreutils/unlink.c b/coreutils/unlink.c
index 56309b1c7..61b108a84 100644
--- a/coreutils/unlink.c
+++ b/coreutils/unlink.c
@@ -1,5 +1,6 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* unlink for busybox 2/*
3 * unlink for busybox
3 * 4 *
4 * Copyright (C) 2014 Isaac Dunham <ibid.ag@gmail.com> 5 * Copyright (C) 2014 Isaac Dunham <ibid.ag@gmail.com>
5 * 6 *
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c
index d6e077430..aa53b14a6 100644
--- a/coreutils/uuencode.c
+++ b/coreutils/uuencode.c
@@ -1,9 +1,9 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * Copyright (C) 2000 by Glenn McGrath 3 * Copyright (C) 2000 by Glenn McGrath
4 * 4 *
5 * based on the function base64_encode from http.c in wget v1.6 5 * based on the function base64_encode from http.c in wget v1.6
6 * Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. 6 * Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
7 * 7 *
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
diff --git a/coreutils/who.c b/coreutils/who.c
index cfe0c921e..80226c3d6 100644
--- a/coreutils/who.c
+++ b/coreutils/who.c
@@ -1,5 +1,5 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/*---------------------------------------------------------------------- 2/*
3 * Mini who is used to display user name, login time, 3 * Mini who is used to display user name, login time,
4 * idle time and host name. 4 * idle time and host name.
5 * 5 *
@@ -13,8 +13,6 @@
13 * Copyright (c) 2002 AYR Networks, Inc. 13 * Copyright (c) 2002 AYR Networks, Inc.
14 * 14 *
15 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 15 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
16 *
17 *----------------------------------------------------------------------
18 */ 16 */
19//config:config WHO 17//config:config WHO
20//config: bool "who (3.7 kb)" 18//config: bool "who (3.7 kb)"