[libvirt] [PATCH] Fix copy&paste typos in virProcessInfoGetAffinity

Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/util/processinfo.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/processinfo.c b/src/util/processinfo.c index 5ae19f8..97ee779 100644 --- a/src/util/processinfo.c +++ b/src/util/processinfo.c @@ -130,31 +130,31 @@ realloc: if (sched_getaffinity(pid, masklen, mask) < 0) { CPU_FREE(mask); if (errno == EINVAL && numcpus < (1024 << 8)) { /* 262144 cpus ought to be enough for anyone */ numcpus = numcpus << 2; goto realloc; } virReportSystemError(errno, - _("cannot set CPU affinity on process %d"), pid); + _("cannot get CPU affinity of process %d"), pid); return -1; } for (i = 0 ; i < maxcpu ; i++) if (CPU_ISSET_S(i, masklen, mask)) VIR_USE_CPU(map, i); #else /* Legacy method uses a fixed size cpu mask, only allows upto 1024 cpus */ cpu_set_t mask; CPU_ZERO(&mask); if (sched_getaffinity(pid, sizeof(mask), &mask) < 0) { virReportSystemError(errno, - _("cannot set CPU affinity on process %d"), pid); + _("cannot get CPU affinity of process %d"), pid); return -1; } for (i = 0 ; i < maxcpu ; i++) if (CPU_ISSET(i, &mask)) VIR_USE_CPU(map, i); #endif -- 1.7.0.2

On 03/09/2010 06:59 AM, Jiri Denemark wrote:
+++ b/src/util/processinfo.c @@ -130,31 +130,31 @@ realloc: ^^^^^^^^
Is there a policy on indentation of labels? By default, emacs starts labels in column 2, so that utilities that expect only function names to appear in column 1 behave in a more predictable manner. I'm not sure what indent(1) does in this case. At any rate, the git hunk header detection regexp is an example of an external tool that expects to find only function names on column 1, and which is being thrown off by the presence of an intermediate label also in that column.
virReportSystemError(errno, - _("cannot set CPU affinity on process %d"), pid); + _("cannot get CPU affinity of process %d"), pid);
ACK. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On Tue, Mar 09, 2010 at 08:35:09AM -0700, Eric Blake wrote:
On 03/09/2010 06:59 AM, Jiri Denemark wrote:
+++ b/src/util/processinfo.c @@ -130,31 +130,31 @@ realloc: ^^^^^^^^
Is there a policy on indentation of labels? By default, emacs starts
start on first column is what you will see all over the code.
labels in column 2, so that utilities that expect only function names to appear in column 1 behave in a more predictable manner. I'm not sure
I don't use emacs myself and don't expect everybody to use it either.
what indent(1) does in this case. At any rate, the git hunk header detection regexp is an example of an external tool that expects to find only function names on column 1, and which is being thrown off by the
then it should be fixed in some ways, or we should not rely on it, if it's just an indication factor in patches, it's a slight annoyance but not worth a change though all the code. We have used labels starting in the first column nearly everywhere, no reason to change it everywhere because of an editor preference at this point. Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

+++ b/src/util/processinfo.c @@ -130,31 +130,31 @@ realloc: ^^^^^^^^
Is there a policy on indentation of labels? By default, emacs starts labels in column 2, so that utilities that expect only function names to appear in column 1 behave in a more predictable manner. I'm not sure what indent(1) does in this case. At any rate, the git hunk header detection regexp is an example of an external tool that expects to find only function names on column 1, and which is being thrown off by the presence of an intermediate label also in that column.
That looks like something which should be fixed in git.
virReportSystemError(errno, - _("cannot set CPU affinity on process %d"), pid); + _("cannot get CPU affinity of process %d"), pid);
ACK.
Pushed, thanks. Jirka
participants (3)
-
Daniel Veillard
-
Eric Blake
-
Jiri Denemark