cregit-Linux how code gets into the kernel

Release 4.8 block/partitions/check.h

Directory: block/partitions
#include <linux/pagemap.h>
#include <linux/blkdev.h>
#include <linux/genhd.h>

/*
 * add_gd_partition adds a partitions details to the devices partition
 * description.
 */

struct parsed_partitions {
	
struct block_device *bdev;
	
char name[BDEVNAME_SIZE];
	struct {
		
sector_t from;
		
sector_t size;
		
int flags;
		
bool has_info;
		
struct partition_meta_info info;
	} 
*parts;
	
int next;
	
int limit;
	
bool access_beyond_eod;
	
char *pp_buf;
};

void free_partitions(struct parsed_partitions *state);

struct parsed_partitions *
check_partition(struct gendisk *, struct block_device *);


static inline void *read_part_sector(struct parsed_partitions *state, sector_t n, Sector *p) { if (n >= get_capacity(state->bdev->bd_disk)) { state->access_beyond_eod = true; return NULL; } return read_dev_sector(state->bdev, n, p); }

Contributors

PersonTokensPropCommitsCommitProp
tejun heotejun heo56100.00%2100.00%
Total56100.00%2100.00%


static inline void put_partition(struct parsed_partitions *p, int n, sector_t from, sector_t size) { if (n < p->limit) { char tmp[1 + BDEVNAME_SIZE + 10 + 1]; p->parts[n].from = from; p->parts[n].size = size; snprintf(tmp, sizeof(tmp), " %s%d", p->name, n); strlcat(p->pp_buf, tmp, PAGE_SIZE); } }

Contributors

PersonTokensPropCommitsCommitProp
al viroal viro5356.38%125.00%
alexey dobriyanalexey dobriyan3132.98%125.00%
andries brouwerandries brouwer88.51%125.00%
andrew mortonandrew morton22.13%125.00%
Total94100.00%4100.00%

extern int warn_no_part;

Overall Contributors

PersonTokensPropCommitsCommitProp
al viroal viro9238.66%213.33%
tejun heotejun heo6426.89%213.33%
alexey dobriyanalexey dobriyan3514.71%16.67%
ming leiming lei104.20%16.67%
will drewrywill drewry104.20%16.67%
andries brouwerandries brouwer93.78%16.67%
linus torvaldslinus torvalds72.94%320.00%
pre-gitpre-git62.52%213.33%
andrew mortonandrew morton41.68%16.67%
christoph hellwigchristoph hellwig10.42%16.67%
Total238100.00%15100.00%
Directory: block/partitions
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.