From owner-freebsd-current@freebsd.org Thu Jan 4 21:44:56 2018 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 C8034EB98BB for ; Thu, 4 Jan 2018 21:44:56 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f52.google.com (mail-it0-f52.google.com [209.85.214.52]) (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 924D4339E for ; Thu, 4 Jan 2018 21:44:55 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f52.google.com with SMTP id m11so2740064iti.1 for ; Thu, 04 Jan 2018 13:44:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=e2rXx4vRf4nUDlPA8b0/m7JQtVKF30q56+e3MywJ2wU=; b=rG9A66EuNFX4p8Cgc4O15bIdkdzibJGzbkLWz5NONcN+hcmAUE/WjmVVAll10DUMcJ 5ebA/jrI27VrRuNSDg9Uch+BV8kYLJuepm+/Q0YswKbhuuoHuSybrezfWEUBaa3nl8Q2 7Rg9ok1W3Y8gnMU6Hmea890lTgZGqRQAOAMOrDMAd3daEW5nm2QJVjHfe+BJzsI2LULE hbqXFPm8bYnwIDOfQQve5g/d2gGqBOIMeuBmkBDKw2akbHKvCLH6fVpeCaEG62EAPqf/ /z33xDx9wMpGuMY/0uSS43wZPCRoSFMoc7crknOvOgbVJD2fEKn/QZMgFEfAHS3/IzVZ 85Rw== X-Gm-Message-State: AKGB3mIUCAUkQcisTY7G3U4c2/KEBUF5BHpeNKoqHUwSzoN/ht36uUoq 0K/wrkl9YfSgfjEUj47RQ+OWAprP X-Google-Smtp-Source: ACJfBosCH1tQswstkROUX5JAoZO5peTB3FyDJS7KJe0O7sbsGexrMHympXtQp5U/YjoohUNYkxwD6w== X-Received: by 10.36.69.164 with SMTP id c36mr1079786itd.27.1515102289124; Thu, 04 Jan 2018 13:44:49 -0800 (PST) Received: from mail-it0-f50.google.com (mail-it0-f50.google.com. [209.85.214.50]) by smtp.gmail.com with ESMTPSA id 15sm2546657iti.15.2018.01.04.13.44.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jan 2018 13:44:48 -0800 (PST) Received: by mail-it0-f50.google.com with SMTP id d16so3991356itj.1 for ; Thu, 04 Jan 2018 13:44:48 -0800 (PST) X-Received: by 10.36.20.73 with SMTP id 70mr1030236itg.55.1515102288327; Thu, 04 Jan 2018 13:44:48 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.15.193 with HTTP; Thu, 4 Jan 2018 13:44:47 -0800 (PST) In-Reply-To: <1106737441.618504.1515098578398@mail.yahoo.com> References: <1106737441.618504.1515098578398.ref@mail.yahoo.com> <1106737441.618504.1515098578398@mail.yahoo.com> From: Conrad Meyer Date: Thu, 4 Jan 2018 13:44:47 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: To which list should I submit a patch? To: Leonardo Fogel Cc: freebsd-current Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 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: Thu, 04 Jan 2018 21:44:56 -0000 IMO, either is fine. I think documentation may refer to docs outside of the src tree, whereas this is in the src tree. Thanks for the submission. Best, Conrad On Thu, Jan 4, 2018 at 12:42 PM, Leonardo Fogel wrote: > > > Hi, > I have written a short patch that replaces the legacy interface make_dev(= 9) with the newer one make_dev_s(9) in the DEV_MODULE(9) man page and in an= example that is included in the base. I do not know if I should submit it = as a PR to "Base System" (since they are in the base tree) or to "Documenta= tion". > Please, could you kindly give me some suggestion? > Thank you for your time. > > Index: src/share/examples/kld/cdev/module/cdevmod.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- src/share/examples/kld/cdev/module/cdevmod.c (revision 327530) > +++ src/share/examples/kld/cdev/module/cdevmod.c (working copy) > @@ -109,6 +109,7 @@ > cdev_load(module_t mod, int cmd, void *arg) > { > int err =3D 0; > + struct make_dev_args mda; > > switch (cmd) { > case MOD_LOAD: > @@ -120,9 +121,15 @@ > printf("Copyright (c) 1998\n"); > printf("Rajesh Vaidheeswarran\n"); > printf("All rights reserved\n"); > - sdev =3D make_dev(&my_devsw, 0, UID_ROOT, GID_WHEEL, 0600, "cdev"= ); > - break; /* Success*/ > > + make_dev_args_init(&mda); > + mda.mda_devsw =3D &my_devsw; > + mda.mda_uid =3D UID_ROOT; > + mda.mda_gid =3D GID_WHEEL; > + mda.mda_mode =3D 0600; > + err =3D make_dev_s(&mda, &sdev, "cdev"); > + break; > + > case MOD_UNLOAD: > printf("Unloaded kld character device driver\n"); > destroy_dev(sdev); > Index: src/share/man/man9/DEV_MODULE.9 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- src/share/man/man9/DEV_MODULE.9 (revision 327530) > +++ src/share/man/man9/DEV_MODULE.9 (working copy) > @@ -58,11 +58,13 @@ > .Xr DECLARE_MODULE 9 > for more information). > The event handler is supposed to create the device with > -.Fn make_dev > +.Fn make_dev_s > on load and to destroy it when it is unloaded using > .Fn destroy_dev . > .Sh EXAMPLES > .Bd -literal > +#include > +#include > #include > #include > > @@ -74,11 +76,17 @@ > foo_load(module_t mod, int cmd, void *arg) > { > int err =3D 0; > + struct make_dev_args mda; > > switch (cmd) { > case MOD_LOAD: > - sdev =3D make_dev(&foo_devsw, 0, UID_ROOT, GID_WHEEL, 0600, "foo= "); > - break; /* Success*/ > + make_dev_args_init(&mda); > + mda.mda_devsw =3D &foo_devsw; > + mda.mda_uid =3D UID_ROOT; > + mda.mda_gid =3D GID_WHEEL; > + mda.mda_mode =3D 0600; > + err =3D make_dev_s(&mda, &sdev, "foo"); > + break; > > case MOD_UNLOAD: > case MOD_SHUTDOWN: > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org= "