lets move this package where it belongs OBS-URL: https://build.opensuse.org/request/show/787830 OBS-URL: https://build.opensuse.org/package/show/Java:packages/rxtx-java?expand=0&rev=1
26 lines
837 B
Diff
26 lines
837 B
Diff
Author: Stefan Seyfried <seife+obs@b1-systems.com>
|
|
|
|
Report an error if we cannot lock the serial port and hint on the
|
|
possible problem.
|
|
Be a bit paranoid about buffer overruns when reporting locking problems.
|
|
|
|
diff --git a/src/SerialImp.c b/src/SerialImp.c
|
|
index d20adcb..8ead1cd 100644
|
|
--- a/src/SerialImp.c
|
|
+++ b/src/SerialImp.c
|
|
@@ -5296,12 +5296,12 @@ int lib_lock_dev_lock( const char *filename, int pid )
|
|
printf("LOCKING %s\n", filename);
|
|
if ( dev_testlock( filename ) )
|
|
{
|
|
- report( "fhs_lock() lockstatus fail\n" );
|
|
+ report_error( "lib_lock_dev_lock() lockstatus fail, are you in group 'lock'?\n" );
|
|
return 1;
|
|
}
|
|
if ( dev_lock( filename ) )
|
|
{
|
|
- sprintf( message,
|
|
+ snprintf( message, 80,
|
|
"RXTX fhs_lock() Error: creating lock file for: %s: %s\n",
|
|
filename, strerror(errno) );
|
|
report_error( message );
|