From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ECACA3C1964 for ; Thu, 15 Jan 2026 18:06:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768500388; cv=none; b=I0egejJAak5ykPAxAtuMzXoLLMNsAqNmibncZM40Hex0zyTuUdG/zp2YEkgdFORmu8zV8eXf+JJKz9q9XzARIqtJ14aiXlTsm/o4J4AuAPYeXj+3krOp71BIhBKiS5glNlBCnXVTGdiwAfumYorFexMaLbZre7SFpp04bDub6+I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768500388; c=relaxed/simple; bh=qPqVwD+N89+OmXZMVjyMgTwuUQROi1yXruu77aZuTtU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dAxG1omW6pcVSeVEyCNtvADaSIoNoalUndACKl0aAmNhxwEpO4hFNkVtE0KbbHs7ulwV+lXaie2vVJqD+IomCBCJrvqQ3DJRhquom4+Qsnt6WeOGl97PmuPmOr23fW9aDCAMEHmuWstthEb4z1H4fu/PElesPPMWN4E3NQ9mgjk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=c6F+yBDf; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="c6F+yBDf" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768500386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3l5p+BX+C0koUHxT6Sf+Jk/kA4Mq4uveo7bobvP6QJE=; b=c6F+yBDf0ASzSKzYt+wQclNdBN7Deh/Hdv4e44c+EqZ/tKFuAqjIwh24nV0RICty3jrjGU ldnhpL+LpxjHHSEmNr/kP/gMwbeJksr4/kTnOEBSND4b+jTu/1jzhDc0wXuTX92l0vxVOw amUwnb9vQUzCWxrJIXp+vKrsVU3A+U8= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-564-5AwuhdExMwm66ZU6dG7ptQ-1; Thu, 15 Jan 2026 13:06:24 -0500 X-MC-Unique: 5AwuhdExMwm66ZU6dG7ptQ-1 X-Mimecast-MFC-AGG-ID: 5AwuhdExMwm66ZU6dG7ptQ_1768500383 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5DFCE1956052; Thu, 15 Jan 2026 18:06:23 +0000 (UTC) Received: from fedora (unknown [10.22.64.87]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id E52D51800994; Thu, 15 Jan 2026 18:06:19 +0000 (UTC) Date: Thu, 15 Jan 2026 15:06:17 -0300 From: Wander Lairson Costa To: Costa Shulyupin Cc: Steven Rostedt , Tomas Glozar , Crystal Wood , John Kacur , Ivan Pravdin , linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] tools/rtla: Generate optstring from long options Message-ID: References: <20260108095011.2115719-1-costa.shul@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260108095011.2115719-1-costa.shul@redhat.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 On Thu, Jan 08, 2026 at 11:49:55AM +0200, Costa Shulyupin wrote: > getopt_long() processes short and long options independently. > RTLA, like the majority of applications, uses both short and long > variants for each logical option. > > Since the val member of struct option holds the letter of the short > variant, the string of short options can be reconstructed from the > array of long options. > > Add getopt_auto() to generate optstring from an array of long options, > eliminating the need to maintain separate short option strings. > > Signed-off-by: Costa Shulyupin ... That's very clever. Reviewed-by: Wander Lairson Costa