New daemon option nodevicecheck added.
This commit is contained in:
+10
-1
@@ -52,6 +52,7 @@ static struct send_data send_data;
|
||||
|
||||
static struct recv_data recv_data;
|
||||
|
||||
static int nodevicecheck = NO;
|
||||
static int rawdump = NO;
|
||||
static int showraw = NO;
|
||||
|
||||
@@ -74,6 +75,14 @@ static FILE *rawfp = NULL;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
eb_set_nodevicecheck(int check)
|
||||
{
|
||||
nodevicecheck = check;
|
||||
}
|
||||
|
||||
void
|
||||
eb_set_rawdump(int dump)
|
||||
{
|
||||
@@ -185,7 +194,7 @@ eb_serial_valid()
|
||||
{
|
||||
int serial;
|
||||
|
||||
if (ioctl(sfd, TIOCMGET, &serial) < 0)
|
||||
if (ioctl(sfd, TIOCMGET, &serial) < 0 && nodevicecheck == NO)
|
||||
return -1;
|
||||
else
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user