summaryrefslogtreecommitdiff
path: root/misc-utils
AgeCommit message (Collapse)AuthorFilesLines
2007-11-28script: cleanup includesSamuel Thibault1-4/+4
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Karel Zak <kzak@redhat.com>
2007-11-26namei: non-linux support (get_current_dir_name() and PATH_MAX)Karel Zak1-4/+15
Co-Author: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Karel Zak <kzak@redhat.com>
2007-11-08build-sys: non-linux supportSamuel Thibault1-0/+2
Here is a patch that disables linux-specific tools on non-linux targets. Signed-Off-By: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-Off-By: Karel Zak <kzak@redhat.com>
2007-11-05script: cleanup gcc warningsRandy Dunlap1-5/+26
Fix strict gcc warnings that come from using: ("-Wall -Wp,-D_FORTIFY_SOURCE=2") script.c:239: warning: ignoring return value of 'write', declared with attribute warn_unused_result script.c:330: warning: ignoring return value of 'write', declared with attribute warn_unused_result script.c:331: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2007-10-26setterm: opened file leaving unclosedKarel Zak1-10/+12
Co-Author: lizf <lizf@cn.fujitsu.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2007-10-16cal: replace errs.h with libc err.hKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-10-11cal: add support for highlighting an arbitrary datePádraig Brady3-28/+31
This is done by calling cal with the extra day parameter like: cal 14 9 1752 Note the tests were updated to use the new syntax. Note also that this patch changes the -y option to always print a full year, even if a month or the -[13] options are specified. This matches the cal operation from bsdmainutils on debian and also allows one to print a full year while highlighting a particular date. Signed-off-by: Pádraig Brady <P@draigBrady.com>
2007-10-11setterm: dump by TIOCLINUX is deprecated since linux 1.1.92.Karel Zak1-29/+6
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-10-05script: dies on SIGWINCHKarel Zak1-4/+10
The "doinput" process doesn't make a difference between SIGWINCH and SIGCHILD. This process also sends unnecessary SIGWINCH to child (the signal is ignored by child). Fixed. Signed-off-by: Karel Zak <kzak@redhat.com>
2007-10-03cal: avoid -Wformat warningsJim Meyering1-2/+2
Avoid this warning from gcc -Wformat: "format not a string literal and no format arguments". Signed-off-by: Jim Meyering <jim@meyering.net>
2007-09-20namei: cleanup tailing white-spacesKarel Zak1-16/+15
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-09-19build-sys: nls/locale handling in util-linux-ng generalMike Frysinger3-3/+0
On Monday 03 September 2007, Karel Zak wrote: > http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/590/focus=592 > > I agree that we need a better support for compilation without > locales, but from my point of view NLS != all locales stuff. The NLS > support is subset only. thinking about the input from everyone, i'd propose the attached ... Only pull in locale.h as needed and move it to the common nls.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2007-09-19namei: add to identify FIFO (named pipe) and update manpageLi Zefan2-0/+12
namei can't identify FIFO, and it will complain that it's an unknown type. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
2007-09-05rename: add description about option -V to manpageLi Zefan1-0/+7
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
2007-09-05rename: remove useless variableLi Zefan1-3/+2
The number of files successfully renamed is calculated and stored in variable ct, > but actually the variable is not used afterwards. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
2007-09-05cal: add description about option -V to manpageLi Zefan1-0/+2
cal support option -V to display version information, but the manpage doesn't mention it. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
2007-08-14build-sys: add --disable-makeinstall-chownKarel Zak1-1/+2
A chown-like operations are unexpected when you execute "make install" as non-root user. For example RPM defines owner+permissions in .spec file -- you needn't to use root account to create useful RPM package. Signed-off-by: Karel Zak <kzak@redhat.com>
2007-08-07script: fix race conditionsKarel Zak1-10/+52
script(1) uses three processes (doinput, dooutput and doshell). It's possible that the shell process is finished before the input and output processes are completely initialized. For example: $ script -c "printf Bingo" In particular case the output and input processes read/write data from shell process in time when the shell process is already done -- so it hangs on read(). The second problem is that the output process can finish although there are unread data from finished shell process -- an output in the typescript file and on terminal is incomplete! script(1) has to pass: $ for i in `seq 1 1000`; do script -q -c "printf 'Bingo\n'"; done | grep -c Bingo 1000 without problems. Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-27remove hardcoded package name from some utilsKarel Zak1-1/+1
We have PACKAGE_STRING in config.h that includes package name and version. It's better to use this macro that hardcoded strings. Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-25look: man page clarificationPádraig Brady1-2/+2
* misc-utils/look.1: Clarify the default state of the -d and -f options Signed-Off-By: Pádraig Brady <P@draigBrady.com>
2007-07-24script: improve quiet modeKarel Zak1-1/+2
script(1) is not consistent and writes "Script started on.." to scriptfile, although the others messages are ignored when running with '-q'. Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-24manpage typosLaMont Jones1-1/+1
Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
2007-07-24logger: use snprintf instead of sprintf in logger.cLaMont Jones1-4/+2
Signed-off-by: LaMont Jones <lamont@mmjgroup.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-11whereis: add lib64 pathsKarel Zak1-3/+4
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-10cal: add test codeKarel Zak2-1/+16
This patch allows to override the time() and define a different time by TEST_TIME env. variable. The code has to be compiled with -DTEST_CAL. Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-03man pages: add "AVAILABILITY" sectionKarel Zak14-0/+42
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-02build-sys: fix linking when ncurses is built with --with-termlib=tinfoArkadiusz Miskiewicz1-0/+8
When system ncurses is built with --with-termlib=tinfo option then there are two libraries - libtinfo (which contains terminal related functions) and libncurses (rest). Correctly link against libtinfo in such case. Signed-off-by: Arkadiusz Miskiewicz <arekm@maven.pl>
2007-06-19ddate: fix compiler warningsKarel Zak1-0/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-14mcookie: remove non-linux codeKarel Zak1-16/+1
Something like #ifdef __linux__ is non-sense in util-linux where everything depend on linux. Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-13misc-utils: remove old cal testKarel Zak1-9/+0
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-12cal: widechar code cleanupKarel Zak1-21/+17
This patch make widechar code (cal headers initialization) more robust. That's possible to format wide char strings by swprintf() and non-widechar version by sprintf(). This is better than the old solution with wcscat(). Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-12cal: ifdef cleanup, non-curses/tempcap code fixesKarel Zak1-20/+16
This patche: - removes extra #ifdef-s, - fixes \n usage when compiled without curses/termcap Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-12cal: fix a segfault and -3m highlightingKarel Zak1-9/+38
Fixes a segfault for certain values of $TERM Fixes alignment issues when the highlighted day (today) is in the last week of the month. Signed-off-by: Pádraig Brady <P@draigBrady.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-16build-sys: do not use wildcards in EXTRA_DISTStepan Kasal1-2/+3
Wildcards in EXTRA_DIST break "make dist" for vpath build. But plain directory names are ok. Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16build-sys: use dist_usrbinexec_SCRIPTS in misc-utils/Makefile.amStepan Kasal1-4/+3
A slightly more concise way to distribute the script "reset". Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16build-sys: let configure instantiate the misc-utils/*.pl scriptsStepan Kasal2-8/+2
The substitution of @PERL@ is most done with AC_CONFIG_FILES. Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16build-sys: do not use internal Autoconf variablesStepan Kasal1-1/+1
This is a cleanup of configure.ac removing the internal ac_cv_* variables. Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16build-sys: do not build convenience libraries in lib/Stepan Kasal1-1/+1
Build lib/*.c individually for each project which uses it, so that the right set of flags is applied each time. Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16build-sys: add SUID_LDFLAGSStepan Kasal1-0/+1
Programs which are usually installed with the setuid bit do need their own CFLAGS and LDFLAGS. SUID_LDFLAGS is analogic to SUID_CFLAGS. Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-05-16build-sys: do not kick off AM_CFLAGS by SUID_CFLAGSStepan Kasal1-1/+1
SUID_CFLAGS are not meant to override the makefile-wide AM_CFLAGS. (We do not use AM_CFLAGS currently, but we will.) Signed-off-by: Stepan Kasal <skasal@redhat.com>
2007-04-25build-sys: add SUID_CFLAGSKarel Zak1-0/+1
The patch allows to define special CFLAGS for typical suid programs (like mount, umount, chfn, ...). Some distributions use for example "-fpic" for suid binaries. Signed-off-by: Karel Zak <kzak@redhat.com>
2007-04-04misc-utils: add scriptreplay manpageMatthias Koenig1-1/+1
a really minor patch which adds the manpage for scriptreplay. Signed-Off-By: Matthias Koenig <mkoenig@suse.de>
2007-03-07look: remove tailing white-spacesKarel Zak1-29/+29
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-06look: fix problem with !isalnum() wordsKarel Zak1-1/+4
for example "$ look apple-pie" Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-08build-sys: fix README filenames and add missing files to EXTRA_DISTsKarel Zak6-2/+36
Also, the patch makes "make mrproper" more robust. Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-31namei: fix logic and infinite loop of symlinksKarel Zak2-14/+33
Don't follow the path if a component is not directory. It doesn't make sense to support something like: $ touch a b $ namei a/b <-- where "a" is not directory The support for infinite loop of symbolic links is a strange wish only. The stack size is very limited. Try: $ ln -s x $ namei x/x [Migration note: severity="low"] Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-30build-sys: fix ifdef ENABLE_WIDECHAR usageKarel Zak1-8/+8
There has been unexpected mix of HAVE_WIDECHAR and ENABLE_WIDECHAR macros. The ENABLE_WIDECHAR is old version and has to be replaced everywhere otherwise we will see bugs with multibyte stuff. Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04execl() should be use NULL not 0Karel Zak1-2/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04build-sys: add missing filesKarel Zak1-1/+4
This patch add all missing headers, man pages and README files to automake stuff and "make dist-gzip" produces useful tarball now. Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-03build-sys: remove generated autotools stuff from gitKarel Zak1-714/+0
The generated autotools stuff shouldn't be maintained by SCM. After check out from git use ./autogen.sh. For more details see README.devel. Signed-off-by: Karel Zak <kzak@redhat.com>