From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id A8CD41A0631 for ; Wed, 1 Apr 2015 16:03:43 +1100 (AEDT) Date: Tue, 31 Mar 2015 22:03:26 -0700 From: Andrew Morton To: Anshuman Khandual Subject: Re: [PATCH 1/2] kernel/reboot.c: Add orderly_reboot for graceful reboot Message-Id: <20150331220326.994661ba.akpm@linux-foundation.org> In-Reply-To: <551B7978.8040502@linux.vnet.ibm.com> References: <1427681733-25488-1-git-send-email-joel@jms.id.au> <551B7978.8040502@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Cc: rusty@rustcorp.com.au, linux-kernel@vger.kernel.org, fabf@skynet.be, jk@ozlabs.org, linuxppc-dev@lists.ozlabs.org, Joel Stanley List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, 01 Apr 2015 10:22:08 +0530 Anshuman Khandual 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"; From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753368AbbDAFDr (ORCPT ); Wed, 1 Apr 2015 01:03:47 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:39888 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751259AbbDAFDn (ORCPT ); Wed, 1 Apr 2015 01:03:43 -0400 Date: Tue, 31 Mar 2015 22:03:26 -0700 From: Andrew Morton To: Anshuman Khandual Cc: Joel Stanley , 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 Message-Id: <20150331220326.994661ba.akpm@linux-foundation.org> In-Reply-To: <551B7978.8040502@linux.vnet.ibm.com> References: <1427681733-25488-1-git-send-email-joel@jms.id.au> <551B7978.8040502@linux.vnet.ibm.com> X-Mailer: Sylpheed 2.7.1 (GTK+ 2.18.9; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 01 Apr 2015 10:22:08 +0530 Anshuman Khandual 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";