]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
cgget output patch
authorIvana Hutarova Varekova <varekova@redhat.com>
Tue, 26 Oct 2010 06:51:57 +0000 (08:51 +0200)
committerJan Safranek <jsafrane@redhat.com>
Tue, 26 Oct 2010 06:51:57 +0000 (08:51 +0200)
This patch fixes cgget to put newline character to the end of all lines

--------------------------------
EXAMPLE:
OLD:
$ ./cgget -g devices //CBSFxx/Zcz6
//CBSFxx/Zcz6:
devices.list: a *:* rwm
devices.deny: devices.allow:

NEW:
$ ./cgget -g devices //CBSFxx/Zcz6
//CBSFxx/Zcz6:
devices.list: a *:* rwm
devices.deny:
devices.allow:

Signed-off-by: Ivana Hutarova Varekova <varekova@redhat.com>
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
src/tools/cgget.c

index f63a98bbb8698bd404c21116aa7a5119dc0358a1..aad222a19e97cec00ac0634d83830b572f6f864f 100644 (file)
@@ -53,6 +53,7 @@ static int display_one_record(char *name, struct cgroup_controller *group_contro
                group_name, name, &handle, line, LL_MAX);
 
        if (ret == ECGEOF) {
+               printf("\n");
                ret = 0;
                goto read_end;
        }