1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-10-16 23:33:16 +03:00

Add -t or --test arg to all tools that update metadata to avoid

committing metadata changes or (de)activating.
This commit is contained in:
Alasdair Kergon
2001-11-28 18:03:11 +00:00
parent 6c4ee29605
commit c2d72fd402
5 changed files with 60 additions and 21 deletions

View File

@@ -121,6 +121,10 @@ int _write(int fd, const void *buf, size_t count)
size_t n = 0;
int tot = 0;
/* Skip all writes */
if (test_mode())
return count;
while (tot < count) {
do
n = write(fd, buf, count - tot);