Commit Graph

1302 Commits

Author SHA1 Message Date
sin
09fcbfc338 Add primitive du(1)
Defaults to a 512-byte blocksize.
2013-10-16 18:18:02 +01:00
sin
84ba9cb87e Remove cut from TODO 2013-10-16 14:14:18 +01:00
sin
8617b29355 Implement the basic binary operations for test(1) 2013-10-15 15:38:32 +01:00
sin
d8718d4159 Do not interpret -[rwxs] as options in chmod(1)
To chmod recursively use `-R' as opposed to `-r' so we can
distinguish it from the mode `-r'.
2013-10-11 17:02:58 +01:00
sin
6492c59072 Free allocated memory
No harm but silences analyzers and we are already
free-ing buffers everywhere else.
2013-10-11 17:02:58 +01:00
sin
486d22fc48 Simplify code in cut(1)
Thanks Roberto and Rob for your input on this.
2013-10-10 23:04:46 +01:00
sin
f559b71488 Free allocated buffer 2013-10-10 20:37:31 +01:00
sin
12ad81fa24 Allow strings(1) to operate on more than one file 2013-10-10 16:05:05 +01:00
sin
484d5b4340 Do not rely on `s' being incremented before taking the address of it
The order of evaluation for the arguments of a function is not
defined by the standard.
2013-10-09 16:42:45 +01:00
sin
cabbf6141e Allow sbase-box to be called as sbase-box tool args... 2013-10-08 23:32:29 +01:00
Truls Becken
576a5ce55e Add cut(1) 2013-10-08 20:41:32 +01:00
sin
9eb15ff232 Simplify code and don't use ftw() for chgrp(1)
Fix issue with uninitialized struct stat buffer as well.
2013-10-08 00:47:04 +01:00
sin
8cd24f0525 Revert "Make sbase compile with musl"
musl-0.9.14 defines PRIO_MIN and PRIO_MAX
2013-10-07 20:47:33 +01:00
sin
f349dd5987 Use arg.h as much as possible and add usage() where missing
Rename eusage() to usage() as well.
2013-10-07 17:13:01 +01:00
sin
5b5f062184 Add license file details at top of files 2013-10-07 17:03:34 +01:00
sin
b5a511dacf Exit with EXIT_SUCCESS/EXIT_FAILURE instead of 0 and 1
Fixed for consistency purposes.
2013-10-07 16:44:22 +01:00
sin
ac033652fe Do not return 0 on error for setsid(1) 2013-10-07 16:44:14 +01:00
sin
bf17657544 Remove chvt(1) from sbase as it is not portable
chvt(1) has been moved to ubase.
2013-10-07 16:43:48 +01:00
sin
eafe2b6526 Staticise global variables in chgrp(1) 2013-10-07 16:12:09 +01:00
sin
7182076473 Add a usage() function like everywhere else 2013-10-07 16:09:14 +01:00
sin
f54c7b4cac Simplify tty(1)
Add a usage line and print "not a tty" for all error cases.
2013-10-07 15:52:33 +01:00
sin
4b30e39348 Fix warning in chroot(1)
chroot.c:12:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  if(aux = getenv("SHELL"))
  ^
2013-10-06 20:35:30 +01:00
Markus Teich
952fa19362 ls: rework implementation for reversing the sort order
Update the usage line as well.
2013-10-06 19:57:21 +01:00
Roberto E. Vargas Caballero
5e9c4d781b Avoid double call to getenv in chroot 2013-10-05 16:24:47 +02:00
sin
c258d7d0b6 Fix invalid use of optind in dirname(1) 2013-10-05 15:11:18 +01:00
sin
a8ef54bae1 Simplify yes(1)
Just pick the first argument if multiple are provided.
2013-10-05 15:11:16 +01:00
Markus Teich
3a3cd24092 ls: add option to reverse the sort order
Now you can list directory contents ordered by mtime with the
latest file displayed last in the output.
2013-10-05 14:58:55 +01:00
Christian Hesse
96c8c5f389 add man page for test 2013-10-05 14:58:55 +01:00
sin
ddec3259aa Add setsid(1) by arg 2013-10-05 14:58:55 +01:00
sin
7be94fd3c8 Add hostname(1) 2013-10-05 14:58:55 +01:00
sin
d0c87f6d3e Add stat(1) 2013-10-05 14:58:55 +01:00
sin
0ed2a55003 Add strings(1) 2013-10-05 14:58:55 +01:00
sin
cd592c9f23 Add initial support for id(1) 2013-10-05 14:58:55 +01:00
sin
bb39bc9596 Use /var/run/utmp for now
Musl-libc seems to define that to /dev/null/utmp for a good
reason.  Use /var/run/utmp for now until we find a better way
to deal with this.
2013-10-05 14:58:55 +01:00
sin
f526ad099f Implement -e support for grep 2013-10-05 13:51:45 +01:00
sin
82bff35228 Support -f for mv
At the moment this does nothing as we do not check anyway.
2013-10-05 13:51:45 +01:00
sin
8c87c20054 Implement -i support for ls 2013-10-05 13:51:45 +01:00
sin
5d35656193 Make sbase compile with musl 2013-10-05 13:51:45 +01:00
sin
573d1954b2 Add cryptmain() and factor out the code from the crypt tools 2013-10-05 13:51:45 +01:00
sin
4d014e66fd Implement -m option for mkdir 2013-10-05 13:51:45 +01:00
sin
36afa1e169 Replace VERSION in manpages with the actual version 2013-10-05 13:51:45 +01:00
sin
428cd4fe84 None of these work without the proper # of arguments so print usage 2013-10-05 13:51:45 +01:00
sin
355911f010 Remove df from TODO - df now lives in ubase 2013-10-05 13:51:45 +01:00
sin
87cde4bcb2 Print the available targets for sbase-box 2013-10-05 13:51:45 +01:00
sin
83c2c3d1f5 Add 'not implemented' errors for unimplemented flags
These used to live in TODO but we got rid off them.  Make sure
we keep track of what we want to support by printing a message
when those flags are unimplemented.
2013-10-05 13:51:45 +01:00
sin
582511d57b Fix some warnings about strcpy() etc. on OpenBSD 2013-10-05 13:50:57 +01:00
sin
7d4d519a51 Fix segfault in tail(1)
We should not be looking at optarg, that's uninitialized.  We
are not using getopt.
2013-09-29 16:58:19 +01:00
David Galos
fd262561a9 Cleaning up who, adding -l and manpage 2013-08-04 19:56:34 -04:00
sin
eddb6d39a5 Ignore tilde in ut_line 2013-08-04 19:28:25 -04:00
sin
918269e057 No need to cast to (char *) 2013-08-04 19:28:12 -04:00