X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=trunk%2Fltt-control%2Flttctl%2Flttctl.c;h=e08280aab2e066cd19f3b8479df1e6ae8ad9397a;hb=1c2291f5d2f79795da29153bd5b962f0539d3316;hp=c1a49cd4f8dff16179e6ad03436cc98376885ed8;hpb=b1f29379e7920a8368b85fffc676c054795d6498;p=ltt-control.git diff --git a/trunk/ltt-control/lttctl/lttctl.c b/trunk/ltt-control/lttctl/lttctl.c index c1a49cd..e08280a 100644 --- a/trunk/ltt-control/lttctl/lttctl.c +++ b/trunk/ltt-control/lttctl/lttctl.c @@ -115,13 +115,14 @@ static void show_arguments(void) printf("\n"); printf(" Advanced options:\n"); printf(" --transport TRANSPORT\n"); - printf(" Set trace's transport. (ex. relay)\n"); + printf(" Set trace's transport. (ex. relay-locked or relay)\n"); printf(" -o, --option OPTION\n"); printf(" Set options, following operations are supported:\n"); printf(" channel..enable=\n"); printf(" channel..overwrite=\n"); printf(" channel..bufnum=\n"); - printf(" channel..bufsize=\n"); + printf(" channel..bufsize= (in bytes, rounded to " + "next power of 2)\n"); printf(" can be set to all for all channels\n"); printf("\n"); printf(" Integration options:\n"); @@ -142,26 +143,6 @@ static void show_arguments(void) printf("\n"); } -static int getdebugfsmntdir(char *mntdir) -{ - char mnt_dir[PATH_MAX]; - char mnt_type[PATH_MAX]; - - FILE *fp = fopen("/proc/mounts", "r"); - if (!fp) - return -EINVAL; - - while (1) { - if (fscanf(fp, "%*s %s %s %*s %*s %*s", mnt_dir, mnt_type) <= 0) - return -ENOENT; - - if (!strcmp(mnt_type, "debugfs")) { - strcpy(mntdir, mnt_dir); - return 0; - } - } -} - /* * Separate option name to 3 fields * Ex: @@ -559,19 +540,15 @@ static int parse_arguments(int argc, char **argv) if (getdebugfsmntdir(channel_root_default) == 0) { strcat(channel_root_default, "/ltt"); opt_channel_root = channel_root_default; + } else { + fprintf(stderr, + "Channel_root is necessary for -w" + " option, but neither --channel_root" + " option\n" + "specified, nor debugfs's mount dir" + " found, mount debugfs also failed\n"); + return -EINVAL; } - /* Todo: - * if (!opt_channel_root) - * if (auto_mount_debugfs_dir(channel_root_default) == 0) - * opt_channel_root = debugfs_dir_mnt_point; - */ - if (!opt_channel_root) { - fprintf(stderr, - "Channel_root is necessary for -w option," - " but neither --channel_root option\n" - "specified, nor debugfs's mount dir found.\n"); - return -EINVAL; - } if (opt_dump_threads == 0) opt_dump_threads = 1;