More generous ignoring of failure of fsync() on inappropriate fd
This commit is contained in:
parent
58432b1d1a
commit
3b8f7c7007
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2011.08.17.162201"
|
#define Cdrskin_timestamP "2011.08.29.213339"
|
||||||
|
@ -2184,6 +2184,8 @@ int burn_stdio_mmc_dummy_write(struct burn_drive *d, int start,
|
|||||||
*/
|
*/
|
||||||
int burn_stdio_sync_cache(int fd, struct burn_drive *d, int flag)
|
int burn_stdio_sync_cache(int fd, struct burn_drive *d, int flag)
|
||||||
{
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
libdax_msgs_submit(libdax_messenger, d->global_index,
|
libdax_msgs_submit(libdax_messenger, d->global_index,
|
||||||
0x0002017d,
|
0x0002017d,
|
||||||
@ -2198,9 +2200,8 @@ int burn_stdio_sync_cache(int fd, struct burn_drive *d, int flag)
|
|||||||
libdax_msgs_submit(libdax_messenger, -1, 0x00000002,
|
libdax_msgs_submit(libdax_messenger, -1, 0x00000002,
|
||||||
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO,
|
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO,
|
||||||
"syncing cache (stdio fsync)", 0, 0);
|
"syncing cache (stdio fsync)", 0, 0);
|
||||||
if (fsync(fd) != 0) {
|
ret = fsync(fd);
|
||||||
if (errno == EINVAL) /* E.g. /dev/null cannot fsync */
|
if (ret != 0 && errno == EIO) {
|
||||||
return 1;
|
|
||||||
libdax_msgs_submit(libdax_messenger, d->global_index,
|
libdax_msgs_submit(libdax_messenger, d->global_index,
|
||||||
0x00020148,
|
0x00020148,
|
||||||
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
|
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
|
||||||
|
Loading…
Reference in New Issue
Block a user