ref: 5296e902fd0199cbfb984a8b5b1f13ab1a41e463
parent: a0ebb0801fe0a8c7eb00018230571174afe914b4
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat May 30 18:37:46 EDT 2015
disk/partfs: adding identical partition is no-op
--- a/sys/src/cmd/disk/partfs.c
+++ b/sys/src/cmd/disk/partfs.c
@@ -69,6 +69,9 @@
}
for (p = tab; p < tab + nelem(tab); p++)
if (p->inuse && strcmp(p->name, name) == 0) {+ /* adding identical partition is no-op */
+ if(p->offset == start && p->length == end - start)
+ return 0;
werrstr("partition name already in use");return -1;
}
--
⑨