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.

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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; 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.