/*
 * report device node name, search "ssd" and "sd" nodes,
 * print the device node name which device path is same as
 * parameter.
 */
static void
report_dev_node_name(char *strdevfspath)
{
	logmsg(MSG_INFO, "strdevfspath: %s\n", strdevfspath);
	print_node_name("ssd", strdevfspath);
	print_node_name("sd", strdevfspath);
}
Exemple #2
0
static struct RNode*
find_def_node(struct RNode* nd)
{
  while (nd) {
    switch (nd_type(nd)) {
    case NODE_DEFN: case NODE_DEFS:
      return nd;
    case NODE_BEGIN:
      nd = nd->nd_body;
      break;
    case NODE_NEWLINE:
      nd = nd->nd_next;
      break;
    default:
      print_node_name(nd_type(nd));
      return NULL;
    }
  }
  return NULL;
}