Commit Graph

596 Commits

Author SHA1 Message Date
Mattias Andrée
f26a1449bf Add pwdx(1)
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-04-20 23:08:51 +01:00
Mattias Andrée
28795cffe2 fsfreeze: make it clear the either -f or -u must be specified, not optional
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-26 19:08:10 +00:00
sin
48728b2594 nologin: Sort includes 2016-03-26 19:08:10 +00:00
Mattias Andrée
6e7386edb3 Add nologin(8)
Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-03-26 19:08:10 +00:00
Eivind Uggedal
e0dc3f9546 dd: implement conv=notrunc support 2016-03-16 10:17:51 +00:00
Eivind Uggedal
596663c1b1 dd: truncate file when using seek= 2016-03-16 10:17:51 +00:00
Eivind Uggedal
e358d74a80 dd: don't let failure to change pipe size affect exit code 2016-03-16 10:17:51 +00:00
Eivind Uggedal
c64b5b04c7 dd: allow count=0 2016-03-16 10:17:51 +00:00
Eivind Uggedal
e5d88b0f30 dd: remove if= noatime optimization 2016-03-16 10:17:51 +00:00
Eivind Uggedal
05a69d9d0d dd: always create of= even if seek= is used 2016-03-16 10:17:51 +00:00
Lucas Gabriel Vuotto
0e7ab0ca9e arg.h: fixed argv checks order
This prevents accessing to a potentially out-of-bounds memory section.

Signed-off-by: Lucas Gabriel Vuotto <l.vuotto92@gmail.com>
2016-02-22 14:36:21 +00:00
sin
ac4fcddd50 df: Don't scream if statvfs() fails 2016-02-16 15:20:10 +00:00
FRIGN
4c33cf2a98 Use estrlcat where possible 2016-02-11 14:36:54 +00:00
Brad Barden
4dbd00fc94 mount: fix mount helper fs option handling
If a mount helper is used, only argopts (given on commandline) are
passed to the helper via -o parameter. Option strings from fstab are
ignored.

This patch replaces global argopts pointer with a character array
fsopts. A maximum length for filesytem options is #defined (used by
fsopts and data), and argument/mntent options are length-checked to fit.
A filesystem with too long an option string will print an error, cause
mount to exit with an error status, and not attempt to mount the
filesystem. This obviates the need for overflow checking of data in
parseopts(), though it hasn't been removed.
2016-02-11 10:16:41 +00:00
Hiltjo Posthuma
4ece17d605 LICENSE: update year and bump to top 2016-02-11 10:16:41 +00:00
izabera
3af0bbd564 fix several problems in dd 2016-01-04 18:07:44 +00:00
sin
4c34f6b100 Update copyright years 2016-01-01 12:20:11 +00:00
sin
a8f95b2f9a Use SLIST instead of TAILQ for pidof(8) 2015-10-07 13:57:24 +01:00
sin
d3efa66c82 Use SLIST instead of TAILQ for killall5(8)
No need to teardown the list at the end.
2015-10-07 13:57:24 +01:00
FRIGN
3e7e1e9644 Fix fallocate(1) manpage
To be honest, I had a little misunderstanding of the fallocate(1)-
utility.
It turns out that it only adds preallocated space if the length
exceeds the size of an already existing file.
No truncation happens.

Thus, I fixed the wording accordingly.
2015-09-14 10:15:55 +01:00
FRIGN
e3b20bbda0 Refactor fallocate(1)
1) Simplify the manpage. Just refer to fallocate(2) and stop trying
   to list supported file systems. This can change and everbody
   with common sense can bring up the relevant manpages of a given
   operating system himself.
   Use the num-semantics.
2) Use estrtonum() instead of estrtol().
3) Allow multiple arguments.
2015-09-14 10:15:55 +01:00
FRIGN
90c7584089 Refactor eject(1)
Reword manpage to be more general (you do not only eject CD-ROM-drives,
but BluRay-drives, floppy drives, LaserDisk-readers, toaster, whatever).

Allow to specify multiple devices in the command line. Doesn't add
LOC (the few more lines added are due to stricter error-checking)
and might become handy for somebody in the future while not
breaking scripts that assume only one argument.

Crying like GNU coreutils when more than one device is given is
not suckless:

$ eject /dev/sr0 /dev/sr1
eject: too many arguments
2015-09-09 23:33:17 +01:00
FRIGN
4c714a9299 Minor newline fix in ctrlaltdel.8 2015-09-07 12:09:59 +01:00
FRIGN
2f766ec92d Add myself to LICENSE 2015-09-07 12:09:59 +01:00
FRIGN
2d38b7cb9e Refactor ctrlaltdel(8)
1) Rewrite the manpage, don't just copy the util-linux manpage.
2) Fix usage() to reflect exclusivity of flags
3) Style changes.
2015-09-07 12:09:59 +01:00
FRIGN
6dedded859 Remove stdlib.h from clear(1)
This is a remnant of the old EXIT_ days we all want to quickly forget...
2015-09-07 11:47:10 +01:00
FRIGN
7b27c7f87c Refactor clear(1)
Adopting best practices(tm) we developed with sbase.
2015-09-07 11:47:10 +01:00
FRIGN
b6669b5f19 Refactor chvt(1)
1) Properly implement arg.h.
2) Use estrtonum instead of estrtol.
3) Check close().
4) Small fixes.
5) Update manpage.
2015-09-07 11:47:10 +01:00
FRIGN
cdaa7b860e Fix build
Dimitris forgot to change one line, which could, depending on the
environment, break the build ($LD would be empty).
2015-09-07 11:47:10 +01:00
sin
570a2bf4ce Use CC for ubase-box, remove LD 2015-09-03 19:57:21 +01:00
Ypnose
52a0874624 uptime.c: Use the UTMP_PATH from config.def.h 2015-09-03 19:57:21 +01:00
Hiltjo Posthuma
71da5628d1 mount: helper support + improvements
- helper support (mount.type).
  - helpers need to be in $PATH, if needed we can add a check for
    /sbin/mount.XXXX
  - pass -B, -M, -R to helper, its more reliable to pass these named
    options with -o however.
- allow prefix "no" for which type no action should be taken:
  mount -a -t nonfs,ext4

fix bugs:
- dont modify me->mnt_opts (used strtok).
2015-05-11 23:35:54 +01:00
Hiltjo Posthuma
ee5b04a7a3 switch_root: execv: show error string 2015-05-10 13:41:23 +01:00
Hiltjo Posthuma
78ddef361c mountpoint: -q should not print errors 2015-05-10 13:41:23 +01:00
Hiltjo Posthuma
7f42fe77c3 strlcpy, strlcat: print program name, use for usage
... same as sbase libutil/strl{cat,cpy}.c. Fix comment in util.h
2015-05-10 13:41:23 +01:00
Hiltjo Posthuma
06e895a67d mountpoint: style, order flags 2015-05-10 12:59:23 +01:00
tm512
d988f01f0f id: Implement -n 2015-04-26 10:40:09 +01:00
Ypnose
91cd388a39 Makefile: missing ubase-box-install in PHONY 2015-04-03 23:10:14 +01:00
Hiltjo Posthuma
47dc849986 TODO: update, thanks Ypnose
sort list
2015-04-01 11:28:22 +01:00
Hiltjo Posthuma
d594d3aa53 lsusb, ps: style: put main at bottom 2015-03-11 15:18:10 +00:00
Hiltjo Posthuma
54b84ee3bd README: explain make ubase-box-install 2015-03-03 13:32:43 +00:00
Hiltjo Posthuma
67220cf2e8 make rule: ubase-box-install
rule to make ubase-box and setup symlinks for $BIN

some (maybe) interesting info:

$ make LDFLAGS="-s -static" CFLAGS="-Os" PREFIX=/ DESTDIR=`pwd`/static-normal install
$ make LDFLAGS="-s -static" CFLAGS="-Os" PREFIX=/ DESTDIR=`pwd`/static-box ubase-box-install

$ du -sk static-normal/ static-box
1776    static-normal
356     static-box
2015-03-03 13:32:43 +00:00
FRIGN
52df018c66 Add tabs(1) to TODO
Thanks Roberto!
2015-02-26 11:00:24 +00:00
sin
9297082b96 add tput to TODO 2015-02-25 22:04:40 +00:00
Hiltjo Posthuma
9455f51dd8 mount: use libutil/concat instead of custom catfile
this trivializes the code some more
2015-02-22 11:34:37 +00:00
sin
a518580165 Sync concat() from sbase 2015-02-22 11:08:57 +00:00
Hiltjo Posthuma
43327506b6 mount: support "noauto" in /etc/fstab 2015-02-20 15:36:33 +00:00
Hiltjo Posthuma
710081b07a mount: change mounted() check
- use getmntent_r instead of getmntent: because getmntent was nested it
  overwrote the previous internal mntent structure.
- check mounted() first, if not try to mount: this also makes sure filesystems
  were not mounted multiple times (like tmpfs) and errno is not overwritten in
  mounted(). For this reason also mount() errno EBUSY can't be used (tested).
2015-02-20 15:36:33 +00:00
Hiltjo Posthuma
a248370eb6 mount: catfile: return 0 or -1 2015-02-20 15:36:33 +00:00
Hiltjo Posthuma
314f2a77f0 last: spaces to tabs 2015-02-20 15:36:33 +00:00