From nobody Tue Jan 20 14:39:24 2026 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dwVN05mcTz6Pf0K for ; Tue, 20 Jan 2026 14:39:44 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dwVN028rHz3wjV for ; Tue, 20 Jan 2026 14:39:44 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-64b58553449so9627477a12.1 for ; Tue, 20 Jan 2026 06:39:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1768919977; cv=none; d=google.com; s=arc-20240605; b=UpdA7w4lR+NXxjY2LTrx2/a/Msf1JIo598WDzfdP6LhoRhIoU8OBqymkBFYSy3L6UF tFqOB/GyHQzMZekVReNgdmWSasKOL/RTF+KcMgIe5DM1fv+LVE5Pd/+c1XY5HWgiDOgD Jp8Abwm/F/tOZqDxDXPWde7ZUTJdI0QFJkSz/8b+DKmABDYlkkG8poiIj1TUDo2PSsTb oK972yv4bRChebZKoJAK7XTV1K9tQkHGCDBtVMoaxeBhXYamgDMXfdjcZS1kMymyC/PI iCjvnd8mVe3HN5f7sdYQUDFXHHdP4dYVzl/kF+d94y73PxPHTjCCUxjLKWzxe3qni5Mw e4tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ftrjGxgiqGMBz+fOD+wyqGE5kQUJo/DvXG27EFrF0mI=; fh=kqYGvc1CPiMznyzlczFZID5ynsbp0zqPedjgPcg5zM4=; b=DdiNG80YjHDrWFV1aD8V3KuyayqgvOLJXGjZh7WENO4F7P7vi/X+nis9Y9XZfC21Du GH1LYTN7+hrEiUWolMvvOWbzu84JZv0iBxXCgDQm8xRAO1O91fjDESQjotNxbhnSl4Fc eJimXa8NZ8wy7qc9oNeStE3DE88xbSilF4gwKq2tRCEXiXvonbB4m6OwapHTd8O4g0I+ itZrvel0/3uFCxPdmKkNczbEk95c/DI4h+vZKFDaDAz2+F9X0WM7Eh7FPNhewqAn1tYZ CUbUlrIrUhsUpcSrl93qAVa7XzG2Ijn0+ZRzM5AbCxHvfblIDQQ4k2XlDf6RL9XUdC0y uJrw==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768919977; x=1769524777; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ftrjGxgiqGMBz+fOD+wyqGE5kQUJo/DvXG27EFrF0mI=; b=K2NnSrKvoOhk4i8ral4p1k+DJZrIxmm/96x5ky1dAeWd2N6UIblCIffNVFzgofeSaN rOGe+TlHm1vrfIg+36cwerb8U81T3+fG0ltS+i6dPUfyApLTskaeIy99o/Ao2HpTBw0o kPvZ9smuFPLZovdrFDXayR5jaci4t7Mpd6ROls1o3m0jfHoSVGr/zjHuh/LsdXhEGbtq VPaGqc47Tzl8yxlnLTJKdkRmGgNe8P6cm3RFsDj9Go1WxrA7ajzZI5vh2+CWTC+e/xdq 0HGoiMqfOZ2Cq+LL7vPr28LosUXRLV6Ck9v7YL+/xD9bUe49gw+XJ6KmhKtbju5fj72c qDaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768919977; x=1769524777; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ftrjGxgiqGMBz+fOD+wyqGE5kQUJo/DvXG27EFrF0mI=; b=qhWUcykTs0dYnFudwabMRpv8f7gYZy1ZYKYKp6xZ/dSrlDbiyER+zC+tu7KdKVKI6f fAkj6uGzAtvwqrdRHXm4nXML/tBaJXiGnrQSHXIdlL3xUY8fi0Qp9hC255j1REBeH9ol wG5ldpgkTIjoeSNEJ1yj2oZJLlegBVUrWrtOBPkoemdHdH/kjTPAFCb0dBpe+vBYCrmt Bl7mHsn5V3lKsF3JyL1PlcrWUkI2d33k55v719AHDeMRnzedI7VMVcgv6HADIBH4/8+n z89uv8FeCCHDEw2QXG3SVPOv9krpt++wOD+GmbicVwycunEVMlJtUEQgpoOPSJI5jn4a PZNw== X-Gm-Message-State: AOJu0YwbVB006URrNBkFQ1a8HNW1v73etjjY/Nz/AfmMMPucST8DfLOW /N00IbmQ7RVOlivkrGVIzW0LEuK593TT+cAvVtn5BsIrpj2rm/fiwg/jg/KcrYMDIKAi7WXGH1p N3ZcXX0N6ZTw0O5uXs/QxukGos3/ACEzyc9c= X-Gm-Gg: AZuq6aIMZ7+mvzHM5uB14s7RwYkMf6I0Mlkww8uo+t+3SIk1CP+AhsBY6lJGhzRy7tG B1oBS5qMbyw6vttVcTTP4WIlPyXb+sOv609RRAC0JpyOtUtweoUNOhFQeFeXdaLfB/Sf9CSvbvj HeUBHnWPh2nNw70VTI80bm8UDoitJqG8y13ky7p2tcKXIQtm0hhDuTUg2+lLFn0JC3033AIfXz3 X+4emeZtls1tY+JhPLBj3g2TWdpG7IG8/xzhFnm7P4ojPfJP5ywstqA82kKQ+RGlfiNHeglaY0L tNRzAVUuLYJ5XDoCs3g9pzuT7pjkEhjI97uh1kA= X-Received: by 2002:a05:6402:320d:b0:658:1025:32cc with SMTP id 4fb4d7f45d1cf-65810253b6bmr349533a12.17.1768919976787; Tue, 20 Jan 2026 06:39:36 -0800 (PST) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Rick Macklem Date: Tue, 20 Jan 2026 06:39:24 -0800 X-Gm-Features: AZwV_QiWhdr7bdCOP5lGkbXl9ntww2-z3f29SuyURIGML03sndncyx6IPNKMATQ Message-ID: Subject: Re: NFS /etc/exports syntax To: Steve Rikli Cc: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dwVN028rHz3wjV On Tue, Jan 20, 2026 at 6:25=E2=80=AFAM Steve Rikli wrote= : > > On Tue, Jan 20, 2026 at 05:47:21AM -0800, Rick Macklem wrote: > > On Mon, Jan 19, 2026 at 9:30=E2=80=AFPM Steve Rikli w= rote: > > > There appear to be some inconsistencies in exports(5) man page, or at > > > least a couple things which have me wondering a bit. :-) > > ... > > > Different but related, is there a syntax rule for "chaining" flags > > > together after a leading "-"? E.g. is something like this valid: > > > > > > /foo -maproot=3Droot,ro,alldirs -network=3D1.2.3.4/24 > > > > No, each flag must be separate with the "-" at the beginning of > > it, from what I can see. (The parsing code is literally decades > > old. It was first written in the late 1980s.) > > Does that mean this line from EXAMPLES is actually invalid? > > /cdrom -alldirs,quiet,ro -network 192.168.33.0 -mask 255.255.255.0 > ^^^^^^^^^^^^^^ > Note the "," between alldirs,quiet,ro flags, with no spaces or dashes. No, the example is fine. I was wrong. I misread the code when I glanced at it. I just tried it and the "separate options with commas works, too. So, you can take your pick. Start with a "-" and then list them separated b= y commas or separate each option by whitespace and have each start with a "-"= . Like I said, many have hacked it over the years and it appears that someone liked what you found "more natural" and added the "separated by commas variant". rick > > > > From a readability standpoint, this seems clearer to me: > > > > > > /foo -maproot=3Droot -ro -alldirs -network=3D1.2.3.4/24 > > > > Not sure what you were asking about this line, but it > > looks ok to me. > > That example was simply to draw a comparison between "-flag1 -flag2" and > the above question about "-flag1,flag2". I find the clarity and > readability better with dashes and spaces between flags, vs. chaining > flags together with commmas. $.02. > > > > but I'm curious if there is a formal syntax definition for this stuff= . > > > > Nope. It's very old C that has been hacked by many over the > > years. I can barely figure out what it is doing when I look at it > > and I've looked at it many times. > > Understood. I'm guessing the very old C code is somewhat reflected in > the exports(5) content -- the man page has a lot of info, and some of it > resembles a proverbial wall of text. :-) The EXAMPLES are pretty > helpful, fortunately. > > Thanks, > sr.