~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/block/partitions/check.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /block/partitions/check.h (Version linux-6.12-rc7) and /block/partitions/check.h (Version linux-4.16.18)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #include <linux/pagemap.h>                          2 #include <linux/pagemap.h>
  3 #include <linux/blkdev.h>                           3 #include <linux/blkdev.h>
  4 #include "../blk.h"                            !!   4 #include <linux/genhd.h>
  5                                                     5 
  6 /*                                                  6 /*
  7  * add_gd_partition adds a partitions details       7  * add_gd_partition adds a partitions details to the devices partition
  8  * description.                                     8  * description.
  9  */                                                 9  */
 10 struct parsed_partitions {                         10 struct parsed_partitions {
 11         struct gendisk *disk;                  !!  11         struct block_device *bdev;
 12         char name[BDEVNAME_SIZE];                  12         char name[BDEVNAME_SIZE];
 13         struct {                                   13         struct {
 14                 sector_t from;                     14                 sector_t from;
 15                 sector_t size;                     15                 sector_t size;
 16                 int flags;                         16                 int flags;
 17                 bool has_info;                     17                 bool has_info;
 18                 struct partition_meta_info inf     18                 struct partition_meta_info info;
 19         } *parts;                                  19         } *parts;
 20         int next;                                  20         int next;
 21         int limit;                                 21         int limit;
 22         bool access_beyond_eod;                    22         bool access_beyond_eod;
 23         char *pp_buf;                              23         char *pp_buf;
 24 };                                                 24 };
 25                                                    25 
 26 typedef struct {                               !!  26 void free_partitions(struct parsed_partitions *state);
 27         struct folio *v;                       << 
 28 } Sector;                                      << 
 29                                                    27 
 30 void *read_part_sector(struct parsed_partition !!  28 struct parsed_partitions *
 31 static inline void put_dev_sector(Sector p)    !!  29 check_partition(struct gendisk *, struct block_device *);
                                                   >>  30 
                                                   >>  31 static inline void *read_part_sector(struct parsed_partitions *state,
                                                   >>  32                                      sector_t n, Sector *p)
 32 {                                                  33 {
 33         folio_put(p.v);                        !!  34         if (n >= get_capacity(state->bdev->bd_disk)) {
                                                   >>  35                 state->access_beyond_eod = true;
                                                   >>  36                 return NULL;
                                                   >>  37         }
                                                   >>  38         return read_dev_sector(state->bdev, n, p);
 34 }                                                  39 }
 35                                                    40 
 36 static inline void                                 41 static inline void
 37 put_partition(struct parsed_partitions *p, int     42 put_partition(struct parsed_partitions *p, int n, sector_t from, sector_t size)
 38 {                                                  43 {
 39         if (n < p->limit) {                        44         if (n < p->limit) {
 40                 char tmp[1 + BDEVNAME_SIZE + 1     45                 char tmp[1 + BDEVNAME_SIZE + 10 + 1];
 41                                                    46 
 42                 p->parts[n].from = from;           47                 p->parts[n].from = from;
 43                 p->parts[n].size = size;           48                 p->parts[n].size = size;
 44                 snprintf(tmp, sizeof(tmp), " %     49                 snprintf(tmp, sizeof(tmp), " %s%d", p->name, n);
 45                 strlcat(p->pp_buf, tmp, PAGE_S     50                 strlcat(p->pp_buf, tmp, PAGE_SIZE);
 46         }                                          51         }
 47 }                                                  52 }
 48                                                    53 
 49 /* detection routines go here in alphabetical  !!  54 extern int warn_no_part;
 50 int adfspart_check_ADFS(struct parsed_partitio !!  55 
 51 int adfspart_check_CUMANA(struct parsed_partit << 
 52 int adfspart_check_EESOX(struct parsed_partiti << 
 53 int adfspart_check_ICS(struct parsed_partition << 
 54 int adfspart_check_POWERTEC(struct parsed_part << 
 55 int aix_partition(struct parsed_partitions *st << 
 56 int amiga_partition(struct parsed_partitions * << 
 57 int atari_partition(struct parsed_partitions * << 
 58 int cmdline_partition(struct parsed_partitions << 
 59 int efi_partition(struct parsed_partitions *st << 
 60 int ibm_partition(struct parsed_partitions *); << 
 61 int karma_partition(struct parsed_partitions * << 
 62 int ldm_partition(struct parsed_partitions *st << 
 63 int mac_partition(struct parsed_partitions *st << 
 64 int msdos_partition(struct parsed_partitions * << 
 65 int osf_partition(struct parsed_partitions *st << 
 66 int sgi_partition(struct parsed_partitions *st << 
 67 int sun_partition(struct parsed_partitions *st << 
 68 int sysv68_partition(struct parsed_partitions  << 
 69 int ultrix_partition(struct parsed_partitions  << 
 70                                                    56 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php