PERFORCE change 214965 for review
Brooks Davis
brooks at FreeBSD.org
Thu Jul 26 19:49:57 UTC 2012
http://p4web.freebsd.org/@@214965?ac=10
Change 214965 by brooks at brooks_ecr_current on 2012/07/26 19:49:22
Access the correct commandline argument rather than a
non-existant one when opening a tty.
Affected files ...
.. //depot/projects/ctsrd/beribsd/src/ctsrd/pictview/pictview.c#13 edit
Differences ...
==== //depot/projects/ctsrd/beribsd/src/ctsrd/pictview/pictview.c#13 (text+ko) ====
@@ -752,10 +752,10 @@
errx(1, "usage: pictview [-s <slide dir>] [tty]");
if (argc == 1) {
kbdfd = -1;
- if (argv[1][0] != '/')
- asprintf(&devpath, "/dev/%s", argv[1]);
+ if (argv[0][0] != '/')
+ asprintf(&devpath, "/dev/%s", argv[0]);
else
- devpath = argv[1];
+ devpath = argv[0];
if ((tty = open(devpath, O_RDWR)) < 0) {
syslog(LOG_ALERT, "open failed with %s", strerror(errno));
err(1, "open(%s)", devpath);
More information about the p4-projects
mailing list