ports/136900: [patch] fix sysutils/sfdisk on 8.x

Alex Kozlov spam at rm-rf.kiev.ua
Sun Jul 19 12:40:02 UTC 2009


>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:



More information about the freebsd-ports-bugs mailing list