From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 23 07:18:18 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 550BB16A420 for ; Thu, 23 Feb 2006 07:18:18 +0000 (GMT) (envelope-from mail@ozzmosis.com) Received: from smtp2.syd.swiftdsl.com.au (smtp2.syd.swiftdsl.com.au [218.214.225.98]) by mx1.FreeBSD.org (Postfix) with SMTP id 8297B43D45 for ; Thu, 23 Feb 2006 07:18:17 +0000 (GMT) (envelope-from mail@ozzmosis.com) Received: (qmail 29812 invoked from network); 23 Feb 2006 07:18:27 -0000 Received: from unknown (HELO blizzard.dancer) (218.214.144.129) by smtp2.syd.swiftdsl.com.au with SMTP; 23 Feb 2006 07:18:27 -0000 Received: from blizzard.dancer (ozzmosis@localhost [127.0.0.1]) by blizzard.dancer (8.12.11/8.12.11) with ESMTP id k1N7IBvT030310 for ; Thu, 23 Feb 2006 18:18:11 +1100 (EST) (envelope-from mail@ozzmosis.com) Received: (from ozzmosis@localhost) by blizzard.dancer (8.12.11/8.12.11/Submit) id k1N7IBVB030309 for freebsd-hackers@freebsd.org; Thu, 23 Feb 2006 18:18:11 +1100 (EST) (envelope-from mail@ozzmosis.com) X-Authentication-Warning: blizzard.dancer: ozzmosis set sender to mail@ozzmosis.com using -f Date: Thu, 23 Feb 2006 18:18:11 +1100 From: andrew clarke To: freebsd-hackers@freebsd.org Message-ID: <20060223071811.GA30268@ozzmosis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.11 Subject: volume serial number + volume label X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2006 07:18:18 -0000 Hi, How can I programmatically retrieve the "volume serial number" and "volume label" of a removable disc in FreeBSD? This is the same information that's presented by issuing a "dir" command in Windows: Volume in drive D is FooBar Volume Serial Number is 58BB-96AA This is for a small disk cataloguing program I'm writing in Python and C++. Thanks. Regards Andrew