Date: Sun, 19 Jul 2009 12:30:59 GMT From: Alex Kozlov <spam@rm-rf.kiev.ua> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/136900: [patch] fix sysutils/sfdisk on 8.x Message-ID: <200907191230.n6JCUxJv082600@www.freebsd.org> Resent-Message-ID: <200907191240.n6JCe2GC021929@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 136900 >Category: ports >Synopsis: [patch] fix sysutils/sfdisk on 8.x >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jul 19 12:40:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Alex Kozlov >Release: FreeBSD 7 >Organization: private >Environment: >Description: fix sysutils/sfdisk on 8.x >How-To-Repeat: >Fix: Patch attached with submission follows: Index: main.c @@ -49,7 +49,7 @@ Initialize(int argc, char *argv[]) { sigset_t signalset; - struct ttysize ts; + struct winsize ws; char *diskname; Fake = FALSE; @@ -59,11 +59,11 @@ diskname = check_arg(argc, argv); - if (ioctl(0, TIOCGSIZE, &ts) == -1) { + if (ioctl(0, TIOCGWINSZ, &ws) == -1) { msgDebug("Unable to get terminal size - errno %d\n", errno); - ts.ts_lines = 0; + ws.ws_row = 0; } - StatusLine = ts.ts_lines ? ts.ts_lines - 1: TTY_STATUS_LINE; + StatusLine = ws.ws_row ? ws.ws_row - 1: TTY_STATUS_LINE; init_dialog(); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907191230.n6JCUxJv082600>