From patchwork Sun Oct 16 21:03:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veronia X-Patchwork-Id: 9378323 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8EF3E60487 for ; Sun, 16 Oct 2016 21:04:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6ED8828C79 for ; Sun, 16 Oct 2016 21:04:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 617B928C80; Sun, 16 Oct 2016 21:04:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E578928C79 for ; Sun, 16 Oct 2016 21:04:21 +0000 (UTC) Received: from localhost ([::1]:57775 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvsbU-0006SU-CR for patchwork-qemu-devel@patchwork.kernel.org; Sun, 16 Oct 2016 17:04:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvsb5-0006Rt-Qv for qemu-devel@nongnu.org; Sun, 16 Oct 2016 17:03:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bvsb1-0007v4-UC for qemu-devel@nongnu.org; Sun, 16 Oct 2016 17:03:55 -0400 Received: from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241]:33488) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bvsb1-0007ty-Mn for qemu-devel@nongnu.org; Sun, 16 Oct 2016 17:03:51 -0400 Received: by mail-lf0-x241.google.com with SMTP id l131so20289542lfl.0 for ; Sun, 16 Oct 2016 14:03:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=6N96kAUHX8cN3xJjZjxOJRg/GagyYqNRcA029YHowEQ=; b=oz/ypIaDRJ5d2EkaTYXc8xzbvuZZ4PwLdeTgb6xCzhMTqUB0FPDAfrLpVopR+vP+RW X630DkRIoJxQljZR2jJwSt7jIUALR+kQZMzhqZQeYII+lcAnyOE65dQF2IX+IRUHir29 dLP8NV2g1Z5JFbXIfNGTnTKnWPetDdT32L6MXvnlbUsFSXm4PklsrrkcnDBb1qDzo7ts NLhf9OT1dZvfyeYDqrm4enfJp2uiw6fP1eephSdTh4lCjbAInwyRYJXjdrKu5E+x+ead qJnVxmxplEBPkUboraz/MHnDzWE540AWrzECGqbeB9VIpvD3WCKhatLTSbYyE6LLyZzP rk6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=6N96kAUHX8cN3xJjZjxOJRg/GagyYqNRcA029YHowEQ=; b=JLpcIHASFnctEAVYu2yt5XJRhoS6rCV8IWl/EAk8eCvQkdKE9UM4PR2RHPBumN9Ptj iLYg+LD3liRP+8Yy996bCjsIEJIdsPNyi3EIJ1pqls5WebstUDrk7aUTq619XzNS/neO akYdtf14Rp5gOiN5CzV8RHZUulD/0qlO84Z5bEuX+F2T/1Csj+dm3R7ljjJkOWW4hhzF fNV055ZPSUDVbtWNx4Cx8/C8Y4a04c1Uug8DS7bY/b9zHbjQmfh2WjcaX+jBLtRXSr1m v0g0fm2esxHZanZEIbnk+U62nchS5kLX6o7KWOmh2qmB9v3V/jh4YPXl5gHL8uO57Vwz Ffqw== X-Gm-Message-State: AA6/9Rk61dPNWY74P36x6g6vBeo0Wnox5r8Xf9PgGPjoaTUVE4ZD/hB/Ym6PTFvZlxV5gg== X-Received: by 10.194.122.67 with SMTP id lq3mr11414047wjb.54.1476651829557; Sun, 16 Oct 2016 14:03:49 -0700 (PDT) Received: from veronia-Lenovo-IdeaPad-S400 ([197.46.206.254]) by smtp.gmail.com with ESMTPSA id q8sm45944430wjj.7.2016.10.16.14.03.48 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 16 Oct 2016 14:03:49 -0700 (PDT) Date: Sun, 16 Oct 2016 23:03:47 +0200 From: Veronia Bahaa To: qemu-devel@nongnu.org Message-ID: <20161016210347.GA4484@veronia-Lenovo-IdeaPad-S400> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::241 Subject: [Qemu-devel] [PATCH] include/qemu: Add documentation to functions in include/qemu/id.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add documentation to the functions id_generate and id_wellformed in include/qemu/id.h Signed-off-by: Veronia Bahaa --- include/qemu/id.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/include/qemu/id.h b/include/qemu/id.h index 40c7010..7bbcdc0 100644 --- a/include/qemu/id.h +++ b/include/qemu/id.h @@ -7,7 +7,30 @@ typedef enum IdSubSystems { ID_MAX /* last element, used as array size */ } IdSubSystems; +/** + * id_generate: Generates an ID of the form PREFIX SUBSYSTEM NUMBER + * where: + * + * - PREFIX is the reserved character '#' + * - SUBSYSTEM identifies the subsystem creating the ID + * - NUMBER is a decimal number unique within SUBSYSTEM. + * + * Example: "#block146" + * + * Returns the generated id string for the subsystem + * + * @id: the subsystem to generate an id for + */ char *id_generate(IdSubSystems id); + +/** + * id_wellformed: checks that an id starts with a letter + * followed by numbers, digits, '-','.', or '_' + * + * Returns %true if the id is well-formed + * + * @id: the id to be checked + */ bool id_wellformed(const char *id); #endif