All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Cc: rusty@rustcorp.com.au, linux-kernel@vger.kernel.org,
	fabf@skynet.be, jk@ozlabs.org, linuxppc-dev@lists.ozlabs.org,
	Joel Stanley <joel@jms.id.au>
Subject: Re: [PATCH 1/2] kernel/reboot.c: Add orderly_reboot for graceful reboot
Date: Tue, 31 Mar 2015 22:03:26 -0700	[thread overview]
Message-ID: <20150331220326.994661ba.akpm@linux-foundation.org> (raw)
In-Reply-To: <551B7978.8040502@linux.vnet.ibm.com>

On Wed, 01 Apr 2015 10:22:08 +0530 Anshuman Khandual <khandual@linux.vnet.ibm.com> wrote:

> >  char poweroff_cmd[POWEROFF_CMD_PATH_LEN] = "/sbin/poweroff";
> > +char reboot_cmd[POWEROFF_CMD_PATH_LEN] = "/sbin/reboot";
> 
> Should not we declare one more REBOOT_CMD_PATH_LEN to make it cleaner.

It doesn't really seem necessary - they'll have the same value anyway.

But if you aren't going to implement the sysctl it isn't needed at all -
just do

static char reboot_cmd[] = "/sbin/reboot";

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Cc: Joel Stanley <joel@jms.id.au>,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	rusty@rustcorp.com.au, fabf@skynet.be, jk@ozlabs.org
Subject: Re: [PATCH 1/2] kernel/reboot.c: Add orderly_reboot for graceful reboot
Date: Tue, 31 Mar 2015 22:03:26 -0700	[thread overview]
Message-ID: <20150331220326.994661ba.akpm@linux-foundation.org> (raw)
In-Reply-To: <551B7978.8040502@linux.vnet.ibm.com>

On Wed, 01 Apr 2015 10:22:08 +0530 Anshuman Khandual <khandual@linux.vnet.ibm.com> wrote:

> >  char poweroff_cmd[POWEROFF_CMD_PATH_LEN] = "/sbin/poweroff";
> > +char reboot_cmd[POWEROFF_CMD_PATH_LEN] = "/sbin/reboot";
> 
> Should not we declare one more REBOOT_CMD_PATH_LEN to make it cleaner.

It doesn't really seem necessary - they'll have the same value anyway.

But if you aren't going to implement the sysctl it isn't needed at all -
just do

static char reboot_cmd[] = "/sbin/reboot";


  reply	other threads:[~2015-04-01  5:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-30  2:15 [PATCH 1/2] kernel/reboot.c: Add orderly_reboot for graceful reboot Joel Stanley
2015-03-30  2:15 ` Joel Stanley
2015-03-30  2:15 ` [PATCH 2/2] powerpc/powernv: Reboot when requested by firmware Joel Stanley
2015-03-30  2:15   ` Joel Stanley
2015-03-30  5:32   ` Michael Ellerman
2015-03-30  5:32     ` Michael Ellerman
2015-03-31 22:39 ` [PATCH 1/2] kernel/reboot.c: Add orderly_reboot for graceful reboot Andrew Morton
2015-03-31 22:39   ` Andrew Morton
2015-04-01  3:17   ` Joel Stanley
2015-04-01  3:17     ` Joel Stanley
2015-04-01  5:05     ` Anshuman Khandual
2015-04-01  5:05       ` Anshuman Khandual
2015-04-01  4:52 ` Anshuman Khandual
2015-04-01  4:52   ` Anshuman Khandual
2015-04-01  5:03   ` Andrew Morton [this message]
2015-04-01  5:03     ` Andrew Morton
2015-04-01  5:05     ` Andrew Morton
2015-04-01  5:32   ` Joel Stanley
2015-04-01  5:32     ` Joel Stanley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150331220326.994661ba.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=fabf@skynet.be \
    --cc=jk@ozlabs.org \
    --cc=joel@jms.id.au \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=rusty@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.