Browse Source

libmount: fix typos

pull/1639/head
наб 3 months ago committed by Karel Zak
parent
commit
a938f9f0c2
  1. 4
      lib/colors.c
  2. 2
      lib/idcache.c
  3. 2
      libmount/src/optstr.c
  4. 4
      libmount/src/utils.c
  5. 2
      login-utils/sulogin-consoles.c
  6. 10
      misc-utils/lsfd-filter.c

4
lib/colors.c

@ -230,8 +230,8 @@ static int filename_to_tokens(const char *str,
/* parse utilname */
p = term_start ? term_start : type_start;
*name = str;
*namesz = p - str - 1;
*name = str;
*namesz = p - str - 1;
return 0;
}

2
lib/idcache.c

@ -97,7 +97,7 @@ static void add_id(struct idcache *ic, char *name, unsigned long int id)
void add_uid(struct idcache *cache, unsigned long int id)
{
struct identry *ent= get_id(cache, id);
struct identry *ent = get_id(cache, id);
if (!ent) {
struct passwd *pw = getpwuid((uid_t) id);

2
libmount/src/optstr.c

@ -887,7 +887,7 @@ static int set_uint_value(char **optstr, unsigned int num,
* @value: pointer to the beginning of the uid value
* @valsz: size of the value
* @next: returns pointer to the next option (optional argument)
*
* Translates "username" or "useruid" to the real UID.
*
* For example:

4
libmount/src/utils.c

@ -596,7 +596,7 @@ int mnt_get_uid(const char *username, uid_t *uid)
return -ENOMEM;
if (!getpwnam_r(username, &pwd, buf, UL_GETPW_BUFSIZ, &pw) && pw) {
*uid= pw->pw_uid;
*uid = pw->pw_uid;
rc = 0;
} else {
DBG(UTILS, ul_debug(
@ -623,7 +623,7 @@ int mnt_get_gid(const char *groupname, gid_t *gid)
return -ENOMEM;
if (!getgrnam_r(groupname, &grp, buf, UL_GETPW_BUFSIZ, &gr) && gr) {
*gid= gr->gr_gid;
*gid = gr->gr_gid;
rc = 0;
} else {
DBG(UTILS, ul_debug(

2
login-utils/sulogin-consoles.c

@ -475,7 +475,7 @@ static int detect_consoles_from_cmdline(struct list_head *consoles)
goto done;
}
words= cmdline;
words = cmdline;
dir = opendir("/dev");
if (!dir)
goto done;

10
misc-utils/lsfd-filter.c

@ -573,7 +573,7 @@ static struct token *parser_read(struct parser *parser)
c0 = parser_getc(parser);
if (c0 == '|') {
t->type = TOKEN_OP2;
t->val.op2= OP2_OR;
t->val.op2 = OP2_OR;
break;
}
snprintf(parser->errmsg, ERRMSG_LEN,
@ -597,19 +597,19 @@ static struct token *parser_read(struct parser *parser)
} else if (strcmp(t->val.str, "or") == 0) {
free(t->val.str);
t->type = TOKEN_OP2;
t->val.op2= OP2_OR;
t->val.op2 = OP2_OR;
} else if (strcmp(t->val.str, "and") == 0) {
free(t->val.str);
t->type = TOKEN_OP2;
t->val.op2= OP2_AND;
t->val.op2 = OP2_AND;
} else if (strcmp(t->val.str, "eq") == 0) {
free(t->val.str);
t->type = TOKEN_OP2;
t->val.op2= OP2_EQ;
t->val.op2 = OP2_EQ;
} else if (strcmp(t->val.str, "ne") == 0) {
free(t->val.str);
t->type = TOKEN_OP2;
t->val.op2= OP2_NE;
t->val.op2 = OP2_NE;
} else if (strcmp(t->val.str, "lt") == 0) {
free(t->val.str);
t->type = TOKEN_OP2;

Loading…
Cancel
Save