From owner-freebsd-bugs@FreeBSD.ORG Tue Jun 9 21:27:38 2015 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CCED1E6 for ; Tue, 9 Jun 2015 21:27:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25FED1683 for ; Tue, 9 Jun 2015 21:27:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t59LRcbd042448 for ; Tue, 9 Jun 2015 21:27:38 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 200746] [PATCH] Add libxo support to jls Date: Tue, 09 Jun 2015 21:27:38 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: elbarto@bocal.org X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 21:27:38 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200746 Bug ID: 200746 Summary: [PATCH] Add libxo support to jls Product: Base System Version: 11.0-CURRENT Hardware: Any OS: Any Status: New Keywords: patch Severity: Affects Only Me Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: elbarto@bocal.org Keywords: patch Created attachment 157588 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=157588&action=edit jls libxo support Hello, This patch add libxo support to jls. It also correct an error in -q switch (the value was always quoted). For boolean values, text is the same, for json and xml it is set to true/false. For multiple value (ip for example), for json it's on a array. Here is some sample outputs : $ jls -qnh --libxo json | python2.7 -m json.tool { "jails": [ { "allow.chflags": false, "allow.mount": false, "allow.mount.devfs": true, "allow.mount.fdescfs": false, "allow.mount.nullfs": false, "allow.mount.procfs": false, "allow.mount.tmpfs": false, "allow.mount.zfs": false, "allow.quotas": false, "allow.raw_sockets": false, "allow.set_hostname": true, "allow.socket_af": false, "allow.sysvipc": false, "children.cur": "0", "children.max": "0", "cpuset.id": "2", "devfs_ruleset": "4", "dying": false, "enforce_statfs": "2", "host": "new", "host.domainname": "\"\"", "host.hostid": "0", "host.hostname": "jail1", "host.hostuuid": "6568ce83-0d95-11e5-a67f-44a8420e7030", "ip4": "disable", "ip4.addr": "10.0.0.2", "ip4.saddrsel": true, "ip6": "disable", "ip6.saddrsel": true, "jid": "5", "name": "ioc-6568ce83-0d95-11e5-a67f-44a8420e7030", "osreldate": "1100076", "osrelease": "11.0-CURRENT", "parent": "0", "path": "/iocage/jails/6568ce83-0d95-11e5-a67f-44a8420e7030/root", "persist": true, "securelevel": "2" } ] } $ jls -qnh --libxo xml 4false2newdisabledisable5ioc-6568ce83-0d95-11e5-a67f-44a8420e7030110007611.0-CURRENT0/iocage/jails/6568ce83-0d95-11e5-a67f-44a8420e7030/roottrue2falsefalsetruefalsefalsefalsefalsefalsefalsefalsetruefalsefalse002""0jail16568ce83-0d95-11e5-a67f-44a8420e703010.0.0.2/ip4.addr>truetrue The diff is attached and also on the libxo_support branch of my fork on github (https://github.com/evadot/freebsd/tree/libxo_support) Cheers. -- You are receiving this mail because: You are the assignee for the bug.