cregit-Linux how code gets into the kernel

Release 4.18 block/partitions/check.h

Directory: block/partitions
/* SPDX-License-Identifier: GPL-2.0 */
#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); }


Tejun Heo56100.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); } }


Al Viro5356.38%125.00%
Alexey Dobriyan3132.98%125.00%
Andries E. Brouwer88.51%125.00%
Andrew Morton22.13%125.00%

extern int warn_no_part;

Overall Contributors

Al Viro9238.49%212.50%
Tejun Heo6426.78%212.50%
Alexey Dobriyan3514.64%16.25%
Will Drewry104.18%16.25%
Ming Lei104.18%16.25%
Andries E. Brouwer83.35%16.25%
Linus Torvalds (pre-git)72.93%212.50%
Linus Torvalds72.93%318.75%
Andrew Morton41.67%16.25%
Christoph Hellwig10.42%16.25%
Greg Kroah-Hartman10.42%16.25%
Directory: block/partitions
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.