mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-24 17:57:48 +03:00
libdevmapper, dmeventd: be paranoid about detecting write failure
* dmeventd/dmeventd.c (_set_oom_adj): When writing to /proc/self/oom_adj, detect failure even if it's hidden behind ferror. [Using dm_fclose's extra ferror test here is probably not needed, since the amount written is nowhere near BUFSIZ, but use it regardless, for consistency. ] * lib/fs/libdevmapper.c (do_suspend): Detect fclose failure when writing to suspend.
This commit is contained in:
parent
0c3cd7e292
commit
f28fd56f76
@ -1,6 +1,7 @@
|
|||||||
Version 1.02.22 -
|
Version 1.02.22 -
|
||||||
================================
|
================================
|
||||||
dm_fclose: new function
|
dm_fclose: new function
|
||||||
|
libdevmapper, dmeventd: be paranoid about detecting write failure
|
||||||
|
|
||||||
Version 1.02.21 - 13th July 2007
|
Version 1.02.21 - 13th July 2007
|
||||||
================================
|
================================
|
||||||
|
@ -1579,7 +1579,7 @@ static int _set_oom_adj(int val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
fprintf(fp, "%i", val);
|
fprintf(fp, "%i", val);
|
||||||
if (fclose(fp))
|
if (dm_fclose(fp))
|
||||||
perror(OOM_ADJ_FILE ": fclose failed");
|
perror(OOM_ADJ_FILE ": fclose failed");
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user