From owner-freebsd-current@freebsd.org Wed Sep 23 15:59:37 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A962EA071A7; Wed, 23 Sep 2015 15:59:37 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f178.google.com (mail-yk0-f178.google.com [209.85.160.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 70DCB1361; Wed, 23 Sep 2015 15:59:37 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by ykft14 with SMTP id t14so46073753ykf.0; Wed, 23 Sep 2015 08:59:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=xFTHiojqDGnvg/oIqaa8T4ujaGRG4Qd5OB/bwybyslA=; b=fIXCIJj2CBtWew9T9P+t1LmZ7u1rvw8+t1Y/yW8XO0RzTCmbMkpSlcMLcjcGAvvs7K LBnQu5xEt6HxPmMXQWWvZfHOfG0coNztFjxU81WhmrETg85wKz5sLlNzIQMVSfDz1bKh bB62r9c47ttWZwGrzDUkG6xGAcY/nOuKV0u9832DTZQ4r0bQDT4B4YT6+9VeomeJRejz diu+LLt+O5FRE7+8MAx9OnGVLXw+rRb+GblM//w8SV4eVeEd+00yljviMFB01qlEWnt0 O43+O9L5sKBHj7dfCZ1bzlwjjJBda72WTEy52ggl03oXxPn/DXI8BYlvoTqLZSM7OV8+ IXkw== X-Received: by 10.170.49.147 with SMTP id 141mr26516121ykr.26.1443023976050; Wed, 23 Sep 2015 08:59:36 -0700 (PDT) Received: from mail-yk0-f170.google.com (mail-yk0-f170.google.com. [209.85.160.170]) by smtp.gmail.com with ESMTPSA id i187sm4717581ywg.41.2015.09.23.08.59.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Sep 2015 08:59:35 -0700 (PDT) Received: by ykdz138 with SMTP id z138so45918402ykd.2; Wed, 23 Sep 2015 08:59:35 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.13.246.70 with SMTP id g67mr25282041ywf.116.1443023975496; Wed, 23 Sep 2015 08:59:35 -0700 (PDT) Reply-To: cem@FreeBSD.org Received: by 10.37.60.198 with HTTP; Wed, 23 Sep 2015 08:59:35 -0700 (PDT) In-Reply-To: <5602B922.20703@FreeBSD.org> References: <5602B922.20703@FreeBSD.org> Date: Wed, 23 Sep 2015 08:59:35 -0700 Message-ID: Subject: Re: dumpdev in loader.conf vs rc.d/dumpon From: Conrad Meyer To: Andriy Gapon Cc: FreeBSD Current , freebsd-rc@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2015 15:59:37 -0000 On Wed, Sep 23, 2015 at 7:37 AM, Andriy Gapon wrote: > > I have recently discovered 'dumpdev' kernel environment variable that is > settable, for example, from loader.conf. To me it *seems* that this variable > has to be set to a device name / path without the leading '/dev'. Why? > If that's so, > then rc.d/dumpon must prepend '/dev' when passing the value of 'dumpdev' to > dumpon(8). dumpon(8) opens the configured file (accessible in the normal namespace, i.e. "/dev/ada0s1b") and uses a magical ioctl on the device to configure it as the dump device. This is all documented in dumpon(8). Additionally, dumpon.c is short and quite legible. I don't see etc/rc.d/dumpon prepending /dev to anything. Best, Conrad