[BACK]Return to optr.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sbin / dump

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sbin/dump/optr.c between version 1.26 and 1.27

version 1.26, 2002/08/02 02:07:09 version 1.27, 2002/08/16 20:21:49
Line 272  sendmes(char *tty, char *message)
Line 272  sendmes(char *tty, char *message)
         int lmsg = 1;          int lmsg = 1;
         FILE *f_tty;          FILE *f_tty;
   
           if (strcspn(tty, "./") != strlen(tty))
                   return;
   
         (void)strncpy(t, _PATH_DEV, sizeof(t) - 1);          (void)strncpy(t, _PATH_DEV, sizeof(t) - 1);
         (void)strncat(t, tty, sizeof(t) - sizeof(_PATH_DEV) - 1);          (void)strncat(t, tty, sizeof(t) - sizeof(_PATH_DEV) - 1);
         t[sizeof(t) - 1] = '\0';          t[sizeof(t) - 1] = '\0';
   
         if ((f_tty = fopen(t, "w")) != NULL) {          if ((f_tty = fopen(t, "w")) != NULL) {
                   if (!isatty(fileno(f_tty)))
                           return;
                 setbuf(f_tty, buf);                  setbuf(f_tty, buf);
                 (void) fprintf(f_tty,                  (void) fprintf(f_tty,
                     "\n\                      "\n\

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

CVSweb <webmaster@jp.NetBSD.org>