Skip to contentSkip to conversation

powertop: remove temporary file

PATCH New Mohammad Merajul Islam Molla 1 participant 1 message Aug 4, 2014

lore
Share & tools
lore

Mohammad Merajul Islam Molla

author
#0 lore raw

PATCH 1/1 powertop: remove temporary file

powertop creates temporary file in /tmp directory during calibration. Simply closing the file does not remove it. Using unlink(), instead of close() to remove temporary file.

Signed-off-by Mohammad Merajul Islam Molla <meraj.enigma(a)gmail.com>
---
 src/calibrate/calibrate.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/calibrate/calibrate.cpp +1 -1
index a9a0a7c..98abfe9 100644
@@ -244,7 +244,7 @@ static void *burn_disk(void *dummy)
 			printf("Error: %s\n", strerror(errno));
 		fdatasync(fd);
 	}
-	close(fd);
+	unlink(filename);
 	return NULL;
 }
 
Signature · 1 line
1.9.1