]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsmem: add Copyright
authorKarel Zak <kzak@redhat.com>
Mon, 7 Nov 2016 10:43:12 +0000 (11:43 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 9 Nov 2016 09:02:32 +0000 (10:02 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/chmem.c
sys-utils/lsmem.c

index cc681b84c4c51c9807f5846f6994ddccb69d4227..14f5aa48d2b7e15990bdf3aa7d64ee9aa2927008 100644 (file)
@@ -17,7 +17,6 @@
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-
 #include <stdio.h>
 #include <unistd.h>
 #include <stdlib.h>
@@ -78,6 +77,7 @@ static int chmem_size(struct chmem_desc *desc, int enable)
        size = desc->size;
        onoff = enable ? "online" : "offline";
        i = enable ? 0 : desc->ndirs - 1;
+
        for (; i >= 0 && i < desc->ndirs && size; i += enable ? 1 : -1) {
                name = desc->dirs[i]->d_name;
                index = strtou64_or_err(name + 6, _("Failed to parse index"));
@@ -123,6 +123,7 @@ static int chmem_range(struct chmem_desc *desc, int enable)
 
        todo = desc->end - desc->start + 1;
        onoff = enable ? "online" : "offline";
+
        for (i = 0; i < desc->ndirs; i++) {
                name = desc->dirs[i]->d_name;
                index = strtou64_or_err(name + 6, _("Failed to parse index"));
index 1dcf8a8e405d0c79fe61f333c12615ddf35ab4bb..2210339a3badf70be3a9541f927fb32beb63b9fb 100644 (file)
@@ -2,6 +2,7 @@
  * lsmem - Show memory configuration
  *
  * Copyright IBM Corp. 2016
+ * Copyright (C) 2016 Karel Zak <kzak@redhat.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -17,7 +18,6 @@
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
-
 #include <c.h>
 #include <nls.h>
 #include <path.h>