Changeset 3232 in MondoRescue for branches/3.2/mindi-busybox/libbb/getpty.c
- Timestamp:
- Jan 1, 2014, 12:47:38 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi-busybox/libbb/getpty.c
r2725 r3232 20 20 grantpt(p); /* chmod+chown corresponding slave pty */ 21 21 unlockpt(p); /* (what does this do?) */ 22 #if 0 /* if ptsname_r is not available... */ 23 const char *name; 24 name = ptsname(p); /* find out the name of slave pty */ 25 if (!name) { 26 bb_perror_msg_and_die("ptsname error (is /dev/pts mounted?)"); 22 # ifndef HAVE_PTSNAME_R 23 { 24 const char *name; 25 name = ptsname(p); /* find out the name of slave pty */ 26 if (!name) { 27 bb_perror_msg_and_die("ptsname error (is /dev/pts mounted?)"); 28 } 29 safe_strncpy(line, name, GETPTY_BUFSIZE); 27 30 } 28 safe_strncpy(line, name, GETPTY_BUFSIZE); 29 #else 31 # else 30 32 /* find out the name of slave pty */ 31 33 if (ptsname_r(p, line, GETPTY_BUFSIZE-1) != 0) { … … 33 35 } 34 36 line[GETPTY_BUFSIZE-1] = '\0'; 35 # endif37 # endif 36 38 return p; 37 39 }
Note:
See TracChangeset
for help on using the changeset viewer.