OPT_END()
};
+#define KVM_INSTANCE_RUNNING "running"
+#define KVM_INSTANCE_SHUTOFF "shut off"
+
void kvm_list_help(void)
{
usage_with_options(list_usage, list_options);
if (strncmp(comm, PROCESS_NAME, strlen(PROCESS_NAME)))
goto cleanup;
- printf("%5d %s\n", pid, name);
+ printf("%5d %-20s %s\n", pid, name, KVM_INSTANCE_RUNNING);
free(comm);
if (dirent->d_type == DT_DIR &&
strcmp(dirent->d_name, ".") &&
strcmp(dirent->d_name, ".."))
- printf(" %s (not running)\n", dirent->d_name);
+ printf("%5s %-20s %s\n", "", dirent->d_name, KVM_INSTANCE_SHUTOFF);
}
return 0;
if (!run && !rootfs)
run = rootfs = true;
- printf(" PID GUEST\n");
+ printf("%6s %-20s %s\n", "PID", "NAME", "STATE");
+ printf("------------------------------------\n");
if (run) {
r = kvm_list_running_instances();