All of lore.kernel.org
 help / color / mirror / Atom feed
* [Powertop] [PATCH] powertop: remove temporary file
@ 2014-08-04 13:52 Mohammad Merajul Islam Molla
  0 siblings, 0 replies; only message in thread
From: Mohammad Merajul Islam Molla @ 2014-08-04 13:52 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 715 bytes --]

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(-)

diff --git a/src/calibrate/calibrate.cpp b/src/calibrate/calibrate.cpp
index a9a0a7c..98abfe9 100644
--- a/src/calibrate/calibrate.cpp
+++ b/src/calibrate/calibrate.cpp
@@ -244,7 +244,7 @@ static void *burn_disk(void *dummy)
 			printf("Error: %s\n", strerror(errno));
 		fdatasync(fd);
 	}
-	close(fd);
+	unlink(filename);
 	return NULL;
 }
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-04 13:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-04 13:52 [Powertop] [PATCH] powertop: remove temporary file Mohammad Merajul Islam Molla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.