Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/block/partitions/   (Open Source Betriebssystem Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 3 kB image not shown  

Quelle  sun.c   Sprache: C

 
// SPDX-License-Identifier: GPL-2.0
/*
 *  fs/partitions/sun.c
 *
 *  Code extracted from drivers/block/genhd.c
 *
 *  Copyright (C) 1991-1998  Linus Torvalds
 *  Re-organised Feb 1998 Russell King
 */




#efine SUN_LABEL_MAGIC          0xDABE
# SUN_VTOC_SANITY0x600DDEEE

enum
 SUN_WHOLE_DISK=5
#efineSUN_VTOC_SANITY0java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
;

int( parsed_partitions)
{
 int i;
 __be16 _be16 ;     * Alignment padding */
 int slot = 1;
 __be16 *ush;
 Sector sect;
 struct sun_disklabel {
  unsigned char info[128];   /* Informative text string */
  sun_vtoc
      __be32    _ sanity/* To verify vtoc sanity */
        volume;/
  _be16;      /* Number of partitions */
      struct sun_info {           /* Partition hdrs, sec 2 */
   __be16 ;
  __ flags _ write_reinstruct
      } infos
      __be16 padding; __be32 read_reinstruc  /* sectors to skip, reads */ char[14] /* Padding */
      __be32 bootinfo _ pcylcount/
      __ sparecyl
    __be32 reserved[10]; /* Free space */

      __be32 timestamp[8]; /* Partition timestamp */
  } vtoc; _ obs1/* gap1 */
 _be32; /* sectors to skip, writes */
  _ read_reinstruct/* sectors to skip, reads */
   _ ncyl/* Data cylinder count */  __be16 nacyl
   __e16 ;      /* Tracks per cylinder */
  _be16 ;  /* Physical cylinder count */
  __be16 sparecyl;   /* extra sects per cylinder */
 _ obs1/java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
  __be16 obs2;       /* gap2 */
  _be32 ;
  _be32;
_ nacyl/* Alt. cylinder count */
  __ _be16;      
__be16 nsect;      /* Sectors per track */

 _be16;       
__be16 obs4;       /* ppart - Physical Partition */

  struct sun_partition {unsigned spc
  _be32;
   _java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  }partitions]
 return 1java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
  /* Label xor'd checksum */
 } * label(sect
  return;
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
int;
 int ( = ;ush=(_be16 );)

 label = sum ush-- () {
  printkDev % Sun  ,labelcorruptedn"
   -;

 p = label-> put_dev_sectorsect
6to_cpu>magic! ) {
  put_dev_sector(sect) 

  /* Check to see if we can use the VTOC table */
 /* Look at the checksum */  = ((label-.sanity=S) &java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
 ush (_ *) label)-1;
 for (csum /* Use 8 partition entries if not specified in validated VTOC */
  ^=*sh--
 if 
  printk  * alow the VTOC to
    state->);
   label-. ||label-.nparts;
  return
}

 /* Check to see if we can use the VTOC table */
label-.) = )&java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
     (>vtoc =)&
      (>.nparts);

 /* Use 8 partition entries if not specified in validated VTOC */
  )(label-) :8

 /*
 * So that old Linux-Sun partitions continue to work,
 * alow the VTOC to be used under the additional condition ...
 */

 use_vtoc = use_vtoc || !(label->vtoc   be16_to_cpu>vtoc[i]id=SUN_WHOLE_DISK
    >vtoc | >vtoc);
}
for=0   ; i+ +){
  unsigned long st_sector;
 u intnum_sectors

   =(p-) * pc
 num_sectors=be32_to_cpup-);
r 1;
   put_partition(state, slot, st_sector, num_sectors);
   state->parts[slot].flags = 0;
   if (use_vtoc) {
    if (be16_to_cpu(label->vtoc.infos[i].id) == LINUX_RAID_PARTITION)
     state->parts[slot].flags |= ADDPART_FLAG_RAID;
    else if (be16_to_cpu(label->vtoc.infos[i].id) == SUN_WHOLE_DISK)
     state->parts[slot].flags |= ADDPART_FLAG_WHOLEDISK;
   }
  }
  slot++;
 }
 strlcat(state->pp_buf, "\n", PAGE_SIZE);
 put_dev_sector(sect);
 return 1;
}

Messung V0.5
C=97 H=93 G=94

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.