Abhishekmishra2808 commented on code in PR #3677:
URL: https://github.com/apache/nuttx-apps/pull/3677#discussion_r3683291575


##########
nshlib/nsh_identity.c:
##########
@@ -381,28 +382,220 @@ int cmd_su(FAR struct nsh_vtbl_s *vtbl, int argc, FAR 
char **argv)
 }
 #endif
 
+#ifndef CONFIG_NSH_DISABLE_ID
+
+/****************************************************************************
+ * Name: nsh_id_format_uid
+ *
+ * Description:
+ *   Format a UID token in Linux id(1) style, e.g. "uid=0(root)".
+ *
+ ****************************************************************************/
+
+static void nsh_id_format_uid(FAR char *buf, size_t buflen,
+                              FAR const char *tag, uid_t uid)
+{
+  FAR struct passwd *pwd = getpwuid(uid);
+
+  if (pwd != NULL && pwd->pw_name != NULL)
+    {
+      snprintf(buf, buflen, "%s=%d(%s)", tag, (int)uid, pwd->pw_name);

Review Comment:
   removed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to