diff --git a/firehose.c b/firehose.c index e273e844bcc8116e689e1e29e5e822430f347559..d46ef126adfc64e9473f44e555f96113e65c59fe 100644 --- a/firehose.c +++ b/firehose.c @@ -226,49 +226,6 @@ static int firehose_nop(int fd) return firehose_read(fd, -1, firehose_nop_parser); } -static int firehose_getstorageinfo_parser(xmlNode *node) -{ - xmlChar *value; - - value = xmlGetProp(node, (xmlChar*)"value"); - if (value) - return -EINVAL; - -#if 0 - xmlGetProp("num_partition_sectors"); - xmlGetProp("SECTOR_SIZE_IN_BYTES"); - xmlGetProp("num_physical_partitions"); - printf("%s\n", node->name); -#endif - return 0; -} - -static int firehose_getstorageinfo(int fd, int partition) -{ - xmlNode *root; - xmlNode *node; - xmlDoc *doc; - int ret; - - doc = xmlNewDoc((xmlChar*)"1.0"); - root = xmlNewNode(NULL, (xmlChar*)"data"); - xmlDocSetRootElement(doc, root); - - node = xmlNewChild(root, NULL, (xmlChar*)"getstorageinfo", NULL); - xml_setpropf(node, "physical_partition_number", "%d", partition); - - ret = firehose_write(fd, doc); - if (ret < 0) - return ret; - - return firehose_read(fd, -1, firehose_getstorageinfo_parser); -} - -static int firehose_configure_parser(xmlNode *node) -{ - return 0; -} - static int firehose_configure(int fd) { xmlNode *root; @@ -473,17 +430,6 @@ int firehose_run(int fd) if (ret) return ret; -#if 0 - int i; - for (i = 0; i < 7; i++) { - printf("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n"); - printf("LUN%d\n", i); - - ret = firehose_getstorageinfo(fd, i); - printf("getstorageinfo: %d\n", ret); - } -#endif - ret = program_execute(fd, firehose_program); if (ret) return ret; diff --git a/program.c b/program.c index 9c23a2ec99bae3cdf151ca420c92970d131fe12a..a5b5467c7cd8ca0f6538d1bebc2c9c6e6169e6af 100644 --- a/program.c +++ b/program.c @@ -51,17 +51,6 @@ static unsigned attr_as_unsigned(xmlNode *node, const char *attr, int *errors) return strtoul((char*)value, NULL, 10); } -static unsigned attr_as_unsignedhex(xmlNode *node, const char *attr, int *errors) -{ - xmlChar *value; - - value = xmlGetProp(node, (xmlChar*)attr); - if (!value) - (*errors)++; - - return strtoul((char*)value, NULL, 16); -} - static const char *attr_as_string(xmlNode *node, const char *attr, int *errors) { xmlChar *value;