| … | |
… | |
| 50 | |
50 | |
| 51 | int sb_open(const char *path, int flags, mode_t mode) |
51 | int sb_open(const char *path, int flags, mode_t mode) |
| 52 | { |
52 | { |
| 53 | int fd; |
53 | int fd; |
| 54 | |
54 | |
|
|
55 | do { |
| 55 | fd = sbio_open(path, flags, mode); |
56 | fd = sbio_open(path, flags, mode); |
|
|
57 | while ((-1 == fd) && (EINTR == errno)); |
|
|
58 | |
|
|
59 | if ((-1 != fd) && (0 != errno)) |
|
|
60 | /* Do not trigger debugging */ |
|
|
61 | errno = 0; |
|
|
62 | |
| 56 | if (-1 == fd) |
63 | if (-1 == fd) |
| 57 | DBG_MSG("Failed to open file '%s'!\n", path); |
64 | DBG_MSG("Failed to open file '%s'!\n", path); |
| 58 | |
65 | |
| 59 | return fd; |
66 | return fd; |
| 60 | } |
67 | } |