  		initmax2 = jinitmax;
  		if (*initmax == ':')
  			strcpy(initmax2, "0:"), initmax2 += 2;
-@@ -674,7 +684,7 @@
+@@ -674,7 +694,7 @@
  	flags = NULL;
  	for (cur = list, entries = 0; cur; cur = cur->fts_link) {
  		if (cur->fts_info == FTS_ERR || cur->fts_info == FTS_NS) {

 						    cur->fts_parent->fts_path,
 						    cur->fts_name);
 						goto label_out;
@@ -775,7 +785,7 @@
 						error = mac_get_link(name,
 						    label);
 					if (error == -1) {

 			rval = 1;
 			break;
 		case FTS_D:
@@ -532,31 +543,40 @@
 			    p->fts_name[0] == '.' && !f_listdot)
 				break;
 
+			if (first) {
+				first = 0;
+				xo_open_list("directory");
+			}
+			xo_open_instance("directory");
+
 			/*
 			 * If already output something, put out a newline as
 			 * a separator.  If multiple arguments, precede each
 			 * directory with its name.
 			 */
 			if (output) {
