From 709c4d66e0b107ca606941b988bad717c0b45d9b Mon Sep 17 00:00:00 2001 From: Denys Dmytriyenko Date: Tue, 17 Mar 2009 14:32:59 -0400 Subject: rename packages/ to recipes/ per earlier agreement See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko Acked-by: Mike Westerhof Acked-by: Philip Balister Acked-by: Khem Raj Acked-by: Marcin Juszkiewicz Acked-by: Koen Kooi Acked-by: Frans Meulenbroeks --- recipes/mgetty/mgetty-1.1.30/40-locks.c_bug153394 | 60 +++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 recipes/mgetty/mgetty-1.1.30/40-locks.c_bug153394 (limited to 'recipes/mgetty/mgetty-1.1.30/40-locks.c_bug153394') diff --git a/recipes/mgetty/mgetty-1.1.30/40-locks.c_bug153394 b/recipes/mgetty/mgetty-1.1.30/40-locks.c_bug153394 new file mode 100644 index 0000000000..0de2fb6b0f --- /dev/null +++ b/recipes/mgetty/mgetty-1.1.30/40-locks.c_bug153394 @@ -0,0 +1,60 @@ +--- mgetty-1.1.28.old/locks.c 2001-01-06 12:46:34.000000000 -0500 ++++ mgetty-1.1.28/locks.c 2002-08-03 16:25:02.000000000 -0400 +@@ -394,9 +394,42 @@ + + #else /* not SVR4 */ + ++static char * unslash_name _P1 ( (device), ++ char *device ) ++{ ++ char *lock_device, *ldev_begin, *ldevice_orig; ++ ++ ldevice_orig = malloc( strlen (device) + 1 ); ++ sprintf( ldevice_orig, "%s", device ); ++ ++ lock_device = strchr( ldevice_orig, '/' ); ++ while (lock_device) ++ { ++ *lock_device = '_'; ++ lock_device = strchr( lock_device, '/' ); ++ } ++ ++ if ( *ldevice_orig == '_' ) ++ { ++ lock_device = strchr( ldevice_orig + 1, '_' ); ++ if (! lock_device) ++ lock_device = ldevice_orig; ++ lock_device++; ++ } ++ else ++ lock_device = ldevice_orig; ++ ++ ldev_begin = malloc( strlen( lock_device ) + 1 ); ++ sprintf( ldev_begin, "%s", lock_device ); ++ free( ldevice_orig ); ++ ++ return ldev_begin; ++} ++ + static char * get_lock_name _P2( (lock_name, device), + char * lock_name, char * device ) + { ++ char *lock; + #ifdef LOCKS_LOWERCASE + /* sco locking convention -> change all device names to lowercase */ + +@@ -425,10 +458,10 @@ + #endif /* LOCKS_LOWERCASE */ + + /* throw out all directory prefixes */ +- if ( strchr( device, '/' ) != NULL ) +- device = strrchr( device, '/' ) +1; +- +- sprintf( lock_name, LOCK, device); ++ ++ lock = unslash_name ( device ); ++ sprintf( lock_name, LOCK, lock ); ++ free ( lock ); + + return lock_name; + } -- cgit v1.2.3