Page MenuHomeFreeBSD

usr.bin/tty/tty.c: Use proper definition of exit status code and stdin macro
ClosedPublic

Authored by sbz on Jun 12 2016, 4:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 18, 5:49 AM
Unknown Object (File)
Sat, Mar 16, 3:01 PM
Unknown Object (File)
Sat, Mar 16, 2:57 PM
Unknown Object (File)
Jan 28 2024, 12:55 AM
Unknown Object (File)
Jan 24 2024, 3:41 AM
Unknown Object (File)
Dec 30 2023, 9:07 PM
Unknown Object (File)
Dec 13 2023, 7:43 PM
Unknown Object (File)
Nov 10 2023, 12:07 AM
Subscribers

Details

Summary

This change add the use of stdin macro and exit status code.

This is a non functional change.

Test Plan

% cd usr.bin/tty/
% sudo make clean
rm -f tty tty.full tty.debug tty.o tty.1.gz tty.1.cat.gz
% sudo make
cc -O2 -pipe -g -MD -MP -MF.depend.tty.o -MTtty.o -std=gnu99 -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -c /usr/home/sbz/src/usr.bin/tty/tty.c -o tty.o
cc -O2 -pipe -g -std=gnu99 -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -o tty.full tty.o
objcopy --only-keep-debug tty.full tty.debug
objcopy --strip-debug --add-gnu-debuglink=tty.debug tty.full tty
gzip -cn /usr/home/sbz/src/usr.bin/tty/tty.1 > tty.1.gz
% /usr/obj/usr/home/sbz/src/usr.bin/tty/tty --help
tty: illegal option -- -
usage: tty [-s]
% echo $?
2
% /usr/obj/usr/home/sbz/src/usr.bin/tty/tty
/dev/pts/7
% echo $?
0
% echo | /usr/obj/usr/home/sbz/src/usr.bin/tty/tty
not a tty
% echo $?
1

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sbz retitled this revision from to usr.bin/tty/tty.c: Use proper definition of exit status code and stdin macro.
sbz updated this object.
sbz edited the test plan for this revision. (Show Details)

Update patch according to recieved feedbacks

sbz edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Jun 13 2016, 4:30 PM
bapt added a reviewer: bapt.
This revision was automatically updated to reflect the committed changes.