All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] uml_utilities_20030903
@ 2003-09-03 20:33 Jeff Dike
  2003-09-04  0:06 ` [uml-devel] Re: [uml-user] uml_utilities_20030903 Net Llama!
  2003-09-04  1:53 ` [uml-devel] uml_utilities_20030903 James Neal
  0 siblings, 2 replies; 4+ messages in thread
From: Jeff Dike @ 2003-09-03 20:33 UTC (permalink / raw)
  To: user-mode-linux-user, user-mode-linux-devel

The main addition in this update is COW V3 support in uml_moo.  uml_mkcow
is also here, although I wouldn't get too attached to it since I'm thinking
about moving it into uml_moo and making that the Swiss Army knife of COW file
manipulation.

There are a bunch of smaller changes in uml_switch, uml_mconsole, and the
honeypot utilities.

				Jeff



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [uml-devel] Re: [uml-user] uml_utilities_20030903
  2003-09-03 20:33 [uml-devel] uml_utilities_20030903 Jeff Dike
@ 2003-09-04  0:06 ` Net Llama!
  2003-09-04  2:30   ` Jeff Dike
  2003-09-04  1:53 ` [uml-devel] uml_utilities_20030903 James Neal
  1 sibling, 1 reply; 4+ messages in thread
From: Net Llama! @ 2003-09-04  0:06 UTC (permalink / raw)
  To: Jeff Dike; +Cc: user-mode-linux-user, user-mode-linux-devel

On 09/03/03 13:33, Jeff Dike wrote:

> The main addition in this update is COW V3 support in uml_moo.  uml_mkcow
> is also here, although I wouldn't get too attached to it since I'm thinking
> about moving it into uml_moo and making that the Swiss Army knife of COW file
> manipulation.
> 
> There are a bunch of smaller changes in uml_switch, uml_mconsole, and the
> honeypot utilities.

Is there a changelog available somewhere for inspection?


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman                       	       netllama@linux-sxs.org
Linux Step-by-step & TyGeMo: 		    http://netllama.ipfox.com

   5:05pm  up 4 days,  2:32,  1 user,  load average: 0.61, 1.49, 1.75



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [uml-devel] uml_utilities_20030903
  2003-09-03 20:33 [uml-devel] uml_utilities_20030903 Jeff Dike
  2003-09-04  0:06 ` [uml-devel] Re: [uml-user] uml_utilities_20030903 Net Llama!
@ 2003-09-04  1:53 ` James Neal
  1 sibling, 0 replies; 4+ messages in thread
From: James Neal @ 2003-09-04  1:53 UTC (permalink / raw)
  To: Jeff Dike; +Cc: user-mode-linux-devel

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

Jeff Dike wrote:
> The main addition in this update is COW V3 support in uml_moo.  uml_mkcow
> is also here, although I wouldn't get too attached to it since I'm thinking
> about moving it into uml_moo and making that the Swiss Army knife of COW file
> manipulation.

Here's the uml_moo.c patch which allows the user to provide the path to
the backing store, overriding the path listed in the COW file.  Useful
when manipulating a COW file created in a chrooted jail.

Updated for uml_utilities_20030903.

Anything you'd like done to it to would make it merge in easier?

-James

[-- Attachment #2: uml_moo.c.patch --]
[-- Type: text/plain, Size: 2247 bytes --]

--- uml_moo.c.orig	Wed Sep  3 12:38:48 2003
+++ uml_moo.c	Wed Sep  3 21:17:55 2003
@@ -38,7 +38,7 @@ static inline void ubd_set_bit(int bit, 
 	data[n] |= (1 << off);
 }
 
-int create_backing_file(char *in, char *out)
+int create_backing_file(char *in, char *out, char *old)
 {
 	int cow_fd, back_fd, in_fd, out_fd;
 	struct stat buf;
@@ -65,10 +65,15 @@ int create_backing_file(char *in, char *
 		exit(1);
 	}
 
+	if(old != NULL) {
+		backing_file = old;
+	}
+
 	if(stat(backing_file, &buf) < 0) {
 		perror("Stating backing file");
 		exit(1);
 	}
+
 	if(buf.st_size != size){
 		fprintf(stderr,"Size mismatch (%ld vs %ld) of COW header "
 			"vs backing file \"%s\"\n", (long int) size, 
@@ -192,13 +197,15 @@ int create_backing_file(char *in, char *
 
 int Usage(char *prog) {
 	fprintf(stderr, "%s usage:\n", prog);
-	fprintf(stderr, "\t%s <COW file> <new backing file>\n", prog);
-	fprintf(stderr, "\t%s -d <COW file>\n", prog);
+	fprintf(stderr, "\t%s [ -O <old backing file> ] <COW file> <new backing file>\n", prog);
+	fprintf(stderr, "\t%s [ -O <old backing file> ] -d <COW file>\n", prog);
 	fprintf(stderr, "Creates a new filesystem image from the COW file "
 		"and its backing file.\n");
 	fprintf(stderr, "Specifying -d will cause a destructive, in-place "
 		"merge of the COW file into\n");
 	fprintf(stderr, "its current backing file\n");
+	fprintf(stderr, "Specifying -O <old backing file> overrides the backing_file\n");
+	fprintf(stderr, "field specified in the COW file.\n");
 	fprintf(stderr, "%s supports version 1 and 2 COW files.\n", prog);
 	exit(1);
 }
@@ -206,6 +213,7 @@ int Usage(char *prog) {
 int main(int argc, char **argv)
 {
 	char *prog = argv[0];
+	char *real_backing_file = NULL;
 	int in_place = 0;
 
 	argv++;
@@ -220,13 +228,23 @@ int main(int argc, char **argv)
 		argc--;
 	}
 
+	if(!strcmp(argv[0], "-O")){
+		real_backing_file = argv[1];
+		argv++;
+		argc--;
+
+		argv++;
+		argc--;
+
+	}
+
 	if(in_place){
 		if(argc != 1) Usage(prog);
-		create_backing_file(argv[0], NULL);
+		create_backing_file(argv[0], NULL, real_backing_file);
 	}
 	else {
 		if(argc != 2) Usage(prog);
-		create_backing_file(argv[0], argv[1]);
+		create_backing_file(argv[0], argv[1], real_backing_file);
 	}
 	return 0;
 }

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [uml-devel] Re: [uml-user] uml_utilities_20030903
  2003-09-04  0:06 ` [uml-devel] Re: [uml-user] uml_utilities_20030903 Net Llama!
@ 2003-09-04  2:30   ` Jeff Dike
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Dike @ 2003-09-04  2:30 UTC (permalink / raw)
  To: Net Llama!; +Cc: user-mode-linux-user, user-mode-linux-devel

netllama@linux-sxs.org said:
> Is there a changelog available somewhere for inspection? 

From my download page, as usual.

				Jeff



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-09-04  2:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-03 20:33 [uml-devel] uml_utilities_20030903 Jeff Dike
2003-09-04  0:06 ` [uml-devel] Re: [uml-user] uml_utilities_20030903 Net Llama!
2003-09-04  2:30   ` Jeff Dike
2003-09-04  1:53 ` [uml-devel] uml_utilities_20030903 James Neal

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.