devfs lockfile support
Göran Runfeldt <[email protected]> Wed, 31 Mar 2004 09:12:26 +0200
| Newsgroups | gmane.comp.mobile.sms.tsms |
|---|---|
| Message-ID | <001d01c416ef$85902df0$4b0ca8c0@default> |
Hi all,
Here is a small change to create proper lockfiles when using Linux devfs.
(/dev/tts/0 -> /var/lock/LCK..0 instead of /var/lock/LCK..tts/0)
I am not really sure if this is the proper name of the lockfile, but my other
modem apps use this filename.
--- sms_client-3.0.2-orig/src/comms/modem.c Sun May 7 15:53:19 2000
+++ sms_client-3.0.2/src/comms/modem.c Wed Mar 31 09:07:02 2004
@@ -1185,7 +1185,7 @@
{ lprintf(LOG_WARNING, "MODEM: MDM_lock_platform invalid using 'TRADITIONAL'\n");
}
- strcat(modem_lockfile, device);
+ strcat(modem_lockfile, basename(device));
}
Göran Runfeldt
--
-----------------------------------------------------------------------