1 --- mgetty-1.1.28.old/locks.c 2001-01-06 12:46:34.000000000 -0500
2 +++ mgetty-1.1.28/locks.c 2002-08-03 16:25:02.000000000 -0400
7 +static char * unslash_name _P1 ( (device),
10 + char *lock_device, *ldev_begin, *ldevice_orig;
12 + ldevice_orig = malloc( strlen (device) + 1 );
13 + sprintf( ldevice_orig, "%s", device );
15 + lock_device = strchr( ldevice_orig, '/' );
19 + lock_device = strchr( lock_device, '/' );
22 + if ( *ldevice_orig == '_' )
24 + lock_device = strchr( ldevice_orig + 1, '_' );
26 + lock_device = ldevice_orig;
30 + lock_device = ldevice_orig;
32 + ldev_begin = malloc( strlen( lock_device ) + 1 );
33 + sprintf( ldev_begin, "%s", lock_device );
34 + free( ldevice_orig );
39 static char * get_lock_name _P2( (lock_name, device),
40 char * lock_name, char * device )
43 #ifdef LOCKS_LOWERCASE
44 /* sco locking convention -> change all device names to lowercase */
47 #endif /* LOCKS_LOWERCASE */
49 /* throw out all directory prefixes */
50 - if ( strchr( device, '/' ) != NULL )
51 - device = strrchr( device, '/' ) +1;
53 - sprintf( lock_name, LOCK, device);
55 + lock = unslash_name ( device );
56 + sprintf( lock_name, LOCK, lock );