[PATCH 10/15] sequencer.c: report error on failure to fopen()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
---
 sequencer.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sequencer.c b/sequencer.c
index 77afecaebf..8d5ebfc14f 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -919,8 +919,11 @@ static void record_in_rewritten(struct object_id *oid,
 		enum todo_command next_command) {
 	FILE *out = fopen(rebase_path_rewritten_pending(), "a");
 
-	if (!out)
+	if (!out) {
+		if (errno != ENOENT)
+			warn_on_inaccessible(rebase_path_rewritten_pending());
 		return;
+	}
 
 	fprintf(out, "%s\n", oid_to_hex(oid));
 	fclose(out);
-- 
2.11.0.157.gd943d85




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]