code: drawterm

Download patch

ref: 550a8ec5f943b87172668581e67128d4770c6e48
parent: fd5ced871042acc294faa2dd2118ad8fe2c61ea2
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Sep 5 06:56:13 EDT 2018

devfs-posix: error on rename when newpath already exists

--- a/kern/devfs-posix.c
+++ b/kern/devfs-posix.c
@@ -429,6 +429,8 @@
 			free(newpath);
 			nexterror();
 		}
+		if(stat(newpath, &stbuf) >= 0)
+			error(Eexist);
 		if(rename(uif->path, newpath) < 0)
 			error(strerror(errno));
 		free(uif->path);