Commit Graph

9 Commits

Author SHA1 Message Date
Markus Rudy a015607af0 Explicitly include sys/sysmacros.h for makedev etc
This header used to be included by sys/types.h in glibc, and musl
adopted the behaviour. However, this dependency was never desired, so
glibc deprecated it in 2016 and finally removed it in 2019, and so did
musl. Explicitly including the header should be a no-op on older libc
versions and fixes the build on newer versions.

https://sourceware.org/bugzilla/show_bug.cgi?id=19239
https://git.musl-libc.org/cgit/musl/commit/?id=f552c79
2023-09-26 09:22:32 +02: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
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
sin a518580165 Sync concat() from sbase 2015-02-22 11:08:57 +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
sin d76319f838 Properly match (ttymaj, ttymin) pairs to tty names in /dev
For the common case where we have pts/ or tty do it straight
away.  Otherwise traverse /dev for a match.  This fixes ps(1) when
it is executed over a serial terminal with tty names like ttyAMA0.
2015-01-16 15:55:07 +00:00
sin ae7aafc127 Rename util/ to libutil/ 2014-11-29 21:46:47 +00:00