Date: Thu, 26 Jul 2012 19:49:56 GMT From: Brooks Davis <brooks@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 214965 for review Message-ID: <201207261949.q6QJnu81034726@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@214965?ac=10 Change 214965 by brooks@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207261949.q6QJnu81034726>