r1618 - dev/concept/moongoo

neocool at linuxfromscratch.org neocool at linuxfromscratch.org
Thu Dec 2 01:42:20 PST 2004


Author: neocool
Date: 2004-12-02 02:42:20 -0700 (Thu, 02 Dec 2004)
New Revision: 1618

Modified:
   dev/concept/moongoo/nalfs.c
Log:
Update.


Modified: dev/concept/moongoo/nalfs.c
===================================================================
--- dev/concept/moongoo/nalfs.c	2004-12-02 00:26:32 UTC (rev 1617)
+++ dev/concept/moongoo/nalfs.c	2004-12-02 09:42:20 UTC (rev 1618)
@@ -8,7 +8,9 @@
 
 void parse_unpack (xmlNodePtr node)
 {
-	// TODO: Handle <unpack>
+	/*printf("tar -C %s %s\n", find_value(node->children, "destination"),
+		find_value(node->children, "archive"));*/
+	// find_value(node->children, "digest");
 }
 
 void parse_remove (xmlNodePtr node)
@@ -76,6 +78,10 @@
 
 void parse_mkdir (xmlNodePtr node)
 {
+	/*char *orig[2] = { "parents", NULL };
+	char *repl[2] = { "-p", NULL };
+	printf("mkdir %s %s\n", find_values_repl(node->children, "option", orig,
+		repl), find_value(node->children, "name"));*/
 }
 
 void parse_search_replace (xmlNodePtr node)
@@ -87,48 +93,40 @@
 
 void parse_permissions (xmlNodePtr node)
 {
+	/*char *orig[2] = { "recursive", NULL };
+	char *repl[2] = { "-R", NULL };
+	printf("chmod %s %s %s\n", find_values_repl(node->children, "option",
+		orig, repl), xmlGetProp(node, "mode"), 
+		find_value(node->children, "name"));*/
 }
 
 void parse_ownership (xmlNodePtr node)
 {
-	xmlNodePtr cur;
-	char *user, *group, *opts, *names;
-	
-	user = xmlGetProp(node, "user");
-	group = xmlGetProp(node, "group");
-
-	opts = (char *)malloc(2);
-	strcpy(opts, "");
-	names = (char *)malloc(2);
-	strcpy(names, "");
-	
-	cur = node->children;
-	while (cur)
-	{
-		if (!strcmp(cur->name, "option"))
-			if (!strcmp(xmlNodeGetContent(cur), "recursive"))
-				opts = strdog2(opts, "-R");	
-		
-		if (!strcmp(cur->name, "name"))
-			names = strdog2(names, xmlNodeGetContent(cur));
-
-		cur = cur->next;
-	}
-
-	/*ret = (char *)malloc(512);
-	snprintf(ret, 512, "chown %s %s:%s %s", opts, user, group, names);*/
+	/*char *orig[2] = { "recursive", NULL };
+	char *repl[2] = { "-R", NULL };
+	printf("chown %s %s:%s %s\n", find_values_repl(node->children, "option",
+		orig, repl), xmlGetProp(node, "user"), xmlGetProp(node, "group"),
+		find_value(node->children, "name"));*/
 }
 
 void parse_patch (xmlNodePtr node)
 {
+	//printf("patch %s\n", find_values(node->children, "param"));
 }
 
 void parse_move (xmlNodePtr node)
 {
+	/*printf("mv %s %s\n", find_value(node->children, "source"), 
+		find_value(node->children, "destination"));*/
 }
 
 void parse_link (xmlNodePtr node)
 {
+	/*char *orig[2] = { "force", NULL };
+	char *repl[2] = { "f", NULL };
+	printf("ln -s%s %s %s\n", find_values_repl(node->children, "option",
+		orig, repl), find_value(node->children, "target"),
+		find_value(node->children, "name"));*/
 }
 
 void t_stage2 (xmlNodePtr node, void *data)




More information about the alfs-log mailing list