Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365505
b: refs/heads/master
c: ba630e4
h: refs/heads/master
i:
  365503: 6d2c682
v: v3
  • Loading branch information
Tejun Heo committed Mar 12, 2013
1 parent 50cbf14 commit c516837
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8719dceae2f98a578507c0f6b49c93f320bd729c
refs/heads/master: ba630e4940924ad1962883c207a62890778ced63
15 changes: 15 additions & 0 deletions trunk/include/linux/cpumask.h
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,21 @@ static inline int cpulist_scnprintf(char *buf, int len,
nr_cpumask_bits);
}

/**
* cpumask_parse - extract a cpumask from from a string
* @buf: the buffer to extract from
* @dstp: the cpumask to set.
*
* Returns -errno, or 0 for success.
*/
static inline int cpumask_parse(const char *buf, struct cpumask *dstp)
{
char *nl = strchr(buf, '\n');
int len = nl ? nl - buf : strlen(buf);

return bitmap_parse(buf, len, cpumask_bits(dstp), nr_cpumask_bits);
}

/**
* cpulist_parse - extract a cpumask from a user string of ranges
* @buf: the buffer to extract from
Expand Down

0 comments on commit c516837

Please sign in to comment.