From owner-svn-src-all@freebsd.org Thu Mar 15 19:58:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EE38F4E4F9 for ; Thu, 15 Mar 2018 19:58:17 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-yw0-x22a.google.com (mail-yw0-x22a.google.com [IPv6:2607:f8b0:4002:c05::22a]) (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 21F1575104 for ; Thu, 15 Mar 2018 19:58:16 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-yw0-x22a.google.com with SMTP id x17so5480352ywj.1 for ; Thu, 15 Mar 2018 12:58:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=+hW73opUtP+J1jMUz1VqsGdiFD7KPLYktSf73o1nk6M=; b=JH4nC21PvK6P0zMdYL9iNp+NgfXWjalSnEsGzC4Mtr8Gj/M/TEKlreKHkiDAfCxZkc 1TOJQ4DxosRX6usLqDs6lq/nf6JlLywkOUWNd6rDUt1FBmFaBlT+7eUUhe16ve9OPe4K H0YeK0hxaxgBeyDhb2pgZ7QqjuktK+5WJvklYchWvB5f+L/zkobqTo5UDQFvf82P+uPT +hbqK1M+kGElJE9OVVndUa1E7QUrmnuqaNbJEhTf0FUqa7lzLPxdZPJFAWgD3w1PVs3J E9XUsjOnPp4Qc1phS5zex7Ul7M67Vt9YVml8XGORY7J/tMjgE3m9racwGQY4sqvO4L9t Wrcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+hW73opUtP+J1jMUz1VqsGdiFD7KPLYktSf73o1nk6M=; b=RKRhi02HYt+UgYBGkfcEoilglbfUw8FrNrVurE+h9y2Lsh9CgkLT5rR2HBpFKbXvbE sHRlb15BVOGv5Yb9KtgGXi+U6obYTIYX4KxBWW7393UX0tDIFqtZKvJXIcjyKsun8gou R6juyYzd2s0xoQ+GGJDRf1hHOUFmq7Mcvrs1dwaW3Iptwmawe9UTzD9s9TFuGpC4mx0B +i1Y3N/9v/iILXE9NvBl/3vPGwL+auokV3rKkh2UrYJEdPwPEDUzlCqboO9wcEf2nV5i IQAqSAr6UcNlsh6WtPCxBP4AGXFTJ0Ob/kKvk54RpJ9aDStiIAsLZuK0p72NwW8dM4ZI Fozg== X-Gm-Message-State: AElRT7HZT4mNbNfyqnwd2g5Vny9OArr1l03hGnu6lR+G7KGzWcWeLtEz VcFWB16DwTGo03f+EBBpE5pV/b5+0SB0LdJguUSagA== X-Google-Smtp-Source: AG47ELukw46aE76UoG72ZtrVwglc5S54d4cYrhUFpvLQy+7hTC3DtHxXe2UOD81Ok2ldmIEZ+R4CApJZgY+FpJSEPa0= X-Received: by 10.129.162.84 with SMTP id z81mr6710723ywg.377.1521143895485; Thu, 15 Mar 2018 12:58:15 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:3492:0:0:0:0:0 with HTTP; Thu, 15 Mar 2018 12:58:15 -0700 (PDT) In-Reply-To: <201803151941.w2FJfQJd072993@repo.freebsd.org> References: <201803151941.w2FJfQJd072993@repo.freebsd.org> From: Oliver Pinter Date: Thu, 15 Mar 2018 20:58:15 +0100 Message-ID: Subject: Re: svn commit: r331021 - stable/11/sys/dev/efidev To: Kyle Evans Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 19:58:17 -0000 On 3/15/18, Kyle Evans wrote: > Author: kevans > Date: Thu Mar 15 19:41:26 2018 > New Revision: 331021 > URL: https://svnweb.freebsd.org/changeset/base/331021 > > Log: > r322279: Don't create /dev/efi without EFI runtime Hi! Is this an MFC or a direct commit to 11-stable? > > Turns out to be even simpler to just not create /dev/efi if we don't > have a efi runtime. > > Modified: > stable/11/sys/dev/efidev/efidev.c > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/sys/dev/efidev/efidev.c > ============================================================================== > --- stable/11/sys/dev/efidev/efidev.c Thu Mar 15 19:32:33 2018 (r331020) > +++ stable/11/sys/dev/efidev/efidev.c Thu Mar 15 19:41:26 2018 (r331021) > @@ -39,28 +39,15 @@ __FBSDID("$FreeBSD$"); > #include > #include > > -static d_open_t efidev_open; > static d_ioctl_t efidev_ioctl; > > static struct cdevsw efi_cdevsw = { > .d_name = "efi", > .d_version = D_VERSION, > - .d_open = efidev_open, > .d_ioctl = efidev_ioctl, > }; > > static int > -efidev_open(struct cdev *dev __unused, int oflags __unused, > - int devtype __unused, struct thread *td __unused) > -{ > - /* > - * Only return success when we have an actual runtime to call. > - */ > - > - return efi_rt_ok(); > -} > - > -static int > efidev_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t addr, > int flags __unused, struct thread *td __unused) > { > @@ -195,6 +182,11 @@ efidev_modevents(module_t m, int event, void *arg __un > > switch (event) { > case MOD_LOAD: > + /* > + * If we have no efi environment, then don't create the device. > + */ > + if (efi_rt_ok() != 0) > + return (0); > make_dev_args_init(&mda); > mda.mda_flags = MAKEDEV_WAITOK | MAKEDEV_CHECKNAME; > mda.mda_devsw = &efi_cdevsw; > _______________________________________________ > svn-src-stable-11@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-stable-11 > To unsubscribe, send any mail to > "svn-src-stable-11-unsubscribe@freebsd.org" >