ALT Linux Bugzilla
– Attachment 3394 Details for
Bug 19313
Не срабатывает правило для udev
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
ifrename-alt-lockfile.patch
ifrename-alt-lockfile.patch (text/plain), 1.01 KB, created by
Alexey Gladkov
on 2009-03-25 14:00:54 MSK
(
hide
)
Description:
ifrename-alt-lockfile.patch
Filename:
MIME Type:
Creator:
Alexey Gladkov
Created:
2009-03-25 14:00:54 MSK
Size:
1.01 KB
patch
obsolete
>diff --git a/wireless-tools/ifrename.c b/wireless-tools/ifrename.c >index 9a29d17..2d5c190 100644 >--- a/wireless-tools/ifrename.c >+++ b/wireless-tools/ifrename.c >@@ -2045,6 +2045,7 @@ mapping_readfile(const char * filename) > size_t linelen = 0; > int linenum = 0; > struct add_extra extrainfo; >+ int config_fd; > > /* Reset the list of filters */ > bzero(selector_active, sizeof(selector_active)); >@@ -2066,6 +2067,22 @@ mapping_readfile(const char * filename) > filename, strerror(errno)); > return(-1); > } >+ >+ /* Open the config file for locking */ >+ if ((config_fd = open(filename, O_RDONLY)) == -1) >+ { >+ fprintf(stderr, "Error: Can't open configuration file `%s': %s\n", >+ filename, strerror(errno)); >+ return(-1); >+ } >+ >+ /* Lock config file */ >+ if (flock(config_fd, LOCK_EX) == -1) >+ { >+ fprintf(stderr, "Error: Can't lock configuration file `%s': %s\n", >+ filename, strerror(errno)); >+ return(-1); >+ } > } > > /* Read each line of file
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 19313
: 3394