Commit Graph

579 Commits

Author SHA1 Message Date
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
Hiltjo Posthuma faa6fe28e2 swapon, swapoff: show usage with -a device
... and small cleanup.
2015-02-06 15:16:24 +00:00
Hiltjo Posthuma 7e394bd70f code-style: cleanup
- move main() at the bottom.
- put global variables at the top.
- improve usage() lines (consistent with man page).
2015-02-06 15:16:24 +00:00
Hiltjo Posthuma 1c7b96de55 dmesg: fix usage and code-style 2015-02-06 15:16:24 +00:00
Hiltjo Posthuma 4855f188c1 fsfreeze: fix usage line, either -f or -u 2015-02-06 15:16:24 +00:00
Hiltjo Posthuma 96c15e765b vtallow, who: usage using argv0 2015-02-06 15:16:23 +00:00
Hiltjo Posthuma c7f472f468 dd: code-style, linewrap 2015-02-06 15:16:23 +00:00
Hiltjo Posthuma f0cfd58e93 chvt: usage using argv0 2015-02-06 15:16:23 +00:00
Hiltjo Posthuma a46944add9 dd.1: fix 2015-02-06 15:16:23 +00:00
Hiltjo Posthuma 363ac46766 Makefile: make man pages with ubase VERSION 2015-02-06 15:16:23 +00:00
Hiltjo Posthuma 544779a7b8 doc: convert man pages to mandoc, fix some typos in the process 2015-02-06 15:16:23 +00:00
Eon S. Jeon 6253da55c1 support llvm-ar
llvm-ar doesn't understand flags prefixed with dashes.
2015-02-03 11:56:06 +00:00
sin 8fe02392ed dd: Only sync once 2015-02-02 22:32:56 +00:00
sin 1c2006fd2c Add Risto to LICENSE 2015-01-26 19:26:22 +00:00
Risto Salminen ab4f93cf47 Fix df hanging when statvfs() fails.
Now df prints out an appropriate error message when statvfs() fails
instead of just hanging. Also make df return 1 when statvfs() fails.
2015-01-26 19:26:22 +00:00
sin f701698297 Don't do a blocking open in ttytostr() 2015-01-16 16:20:16 +00:00
sin a7a561ef00 Handle cleanup properly in ttytostr() 2015-01-16 16:10:38 +00:00
sin 8a95422ff1 Check if the ttymaj/ttymin match is actually a tty 2015-01-16 16:10:37 +00:00