From owner-freebsd-current@freebsd.org Thu Jan 14 04:46:53 2021 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 309654D487A for ; Thu, 14 Jan 2021 04:46:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) (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 "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGWxS11clz4lb3 for ; Thu, 14 Jan 2021 04:46:51 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x734.google.com with SMTP id z11so5687730qkj.7 for ; Wed, 13 Jan 2021 20:46:51 -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:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MBqyTiJqE+LUc4dL64nwYP3pHnKRsaccwKFlrRBMw7Y=; b=uH3hPQAGdJrxatVWlStkbgy5ZsODxq0mKszRiKffSAasY1z2T4Ic0AfWPnDnSO1Pa2 HVtAOvv+MTlvS7V1JhEz6ZUZ1by50mpVk5v+Luqs1IAUlzEUakr7iZAgp1AmgpH8X65R A+zh8KSwJrBYxYAtXhm1QD3zLouJg36OHKIgA2CwtrLl1uYwcMrrjFIK31hnpu6QdYVU wRjdx/jbjy22ymJnfyFLq6kVJMaIGFulWUbb6DoYarKV2okOhPgUZeVul0Dx8W8TzgXF ZBroasVMftwuvQslRcFeCRyw5hRHvYypf3IblQTPE90chp/Y4+aTUhDMeSG1xQpZ6oSt 0DUQ== X-Gm-Message-State: AOAM532+EqQwIM7HECwR5VoqplsaWfxCr1QLOI9IUxX1xtE3FZCdyVk5 JzYhcdy21z6UfrW5feOJeYaeVeZ0gLMEmKLAF2Vf2lEVXMnciw== X-Google-Smtp-Source: ABdhPJyLMXllZKnJt/RMW4VEiaQivOT6NGvVG8jn2zHW/DyWFk28SCHuMIIq9h9WrHBaL3gWdoQT0LppBilhmouZFFY= X-Received: by 2002:a37:a614:: with SMTP id p20mr5370496qke.359.1610599611176; Wed, 13 Jan 2021 20:46:51 -0800 (PST) MIME-Version: 1.0 References: <20210114032209.GA94213@www.zefox.net> In-Reply-To: <20210114032209.GA94213@www.zefox.net> From: Warner Losh Date: Wed, 13 Jan 2021 21:46:39 -0700 Message-ID: Subject: Re: How does /usr/bin/uname work in plain english? To: bob prohaska Cc: FreeBSD Current X-Rspamd-Queue-Id: 4DGWxS11clz4lb3 X-Spamd-Bar: / X-Spamd-Result: default: False [0.56 / 15.00]; RCVD_TLS_ALL(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::734:from]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::734:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::734:from]; NEURAL_HAM_SHORT(-0.44)[-0.443]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; SUBJECT_ENDS_QUESTION(1.00)[]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[freebsd-current] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 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, 14 Jan 2021 04:46:53 -0000 On Wed, Jan 13, 2021, 8:22 PM bob prohaska wrote: > Since the switch to git I've been wondering how /usr/bin/uname works. > The man page is thin on details and uname.c is far too subtle. > > For example, on my test box uname -a reports > FreeBSD www.zefox.org 13.0-CURRENT FreeBSD 13.0-CURRENT #7 > main-c255937-g818390ce0ca5: Wed Jan 13 16:42:12 PST 2021 > bob@www.zefox.org:/usr/obj/usr/freebsd-src/arm64.aarch64/sys/GENERIC-MMCCAM > arm64 > which seems to replay git nomeclature. > > However, uname -KU reports > 1300135 1300134 > which is admirably readable, even for me. > > Is there a natural language description detailing how > uname -KU outputs are computed, and roughly what they mean? > I've noticed that different sources sometimes produce the > same values, so the level of detail is less, but might suffice > for initial reports to the mailing lists. > __FreeBSD_version is defined in sys/param.h. For -U, uname prints that value. For -K, it asks the kernel for this value to print. MMmmnnn where MM is the major version, mm is minor, and nnn is incremental when the APIs change, approximately weekly. Warner Thanks for reading, > > bob prohaska > > > > _______________________________________________ > 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" >