[parted-devel] [PATCH] Fix typos and remove unneeded spaces

yegorslists at googlemail.com yegorslists at googlemail.com
Tue May 23 07:43:45 BST 2023


From: Yegor Yefremov <yegorslists at googlemail.com>

Signed-off-by: Yegor Yefremov <yegorslists at googlemail.com>
---
 doc/parted.texi           |  4 ++--
 include/parted/fdasd.in.h |  2 +-
 parted/parted.c           | 38 +++++++++++++++++++-------------------
 tests/gpt-attrs           |  2 +-
 4 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/doc/parted.texi b/doc/parted.texi
index 5d4074d..4704e26 100644
--- a/doc/parted.texi
+++ b/doc/parted.texi
@@ -1049,7 +1049,7 @@ Linux is 0x83. A list with some IDs is available at
 
 On GPT set the type-uuid to @var{uuid} on partition
 @var{number}. E.g. the UUID for Linux is
-0fc63daf-8483-4772-8e79-3d69d8477de4. A list with some UUIDs is availabe
+0fc63daf-8483-4772-8e79-3d69d8477de4. A list with some UUIDs is available
 at @uref{https://en.wikipedia.org/wiki/GUID_Partition_Table}.
 
 @end deffn
@@ -1230,7 +1230,7 @@ available at @uref{https://ftp.gnu.org/gnu/parted}.
 
 Initial Texinfo formatting by Richard M. Kreuter, 2002.
 
-Maintainance by Andrew Clausen from 2002 to 2005 and by Leslie P. Polzer
+Maintenance by Andrew Clausen from 2002 to 2005 and by Leslie P. Polzer
 from July 2005 onwards.
 
 This manual is distributed under the GNU Free Documentation License,
diff --git a/include/parted/fdasd.in.h b/include/parted/fdasd.in.h
index e3ba183..b6a29c6 100644
--- a/include/parted/fdasd.in.h
+++ b/include/parted/fdasd.in.h
@@ -48,7 +48,7 @@
 /*
  * struct dasd_information_t
  * represents any data about the device, which is visible to userspace.
- *  including foramt and featueres.
+ * including format and features.
  */
 typedef struct dasd_information_t {
 	unsigned int devno;           /* S/390 devno                         */
diff --git a/parted/parted.c b/parted/parted.c
index 3abb52f..e990641 100644
--- a/parted/parted.c
+++ b/parted/parted.c
@@ -34,7 +34,7 @@
 #define AUTHORS \
   "<http://git.debian.org/?p=parted/parted.git;a=blob_plain;f=AUTHORS>"
 
-/* The official name of this program (e.g., no `g' prefix).  */
+/* The official name of this program (e.g., no `g' prefix). */
 #define PROGRAM_NAME "parted"
 
 #define N_(String) String
@@ -75,7 +75,7 @@ static int MEGABYTE_SECTORS (PedDevice* dev)
 }
 
 /* For long options that have no equivalent short option, use a
-   non-character as a pseudo short option, starting with CHAR_MAX + 1.  */
+   non-character as a pseudo short option, starting with CHAR_MAX + 1. */
 enum
 {
   PRETEND_INPUT_TTY = CHAR_MAX + 1,
@@ -373,13 +373,13 @@ prefer_snap (PedSector s, int what, PedGeometry* range, EMoves* allow,
         return move;
 }
 
-/* Snaps a partition to nearby partition boundaries.  This is useful for
+/* Snaps a partition to nearby partition boundaries. This is useful for
  * gobbling up small amounts of free space, and also for reinterpreting small
  * changes to a partition as non-changes (eg: perhaps the user only wanted to
  * resize the end of a partition).
  *      Note that this isn't the end of the story... this function is
- * always called before the constraint solver kicks in.  So you don't need to
- * worry too much about inadvertantly creating overlapping partitions, etc.
+ * always called before the constraint solver kicks in. So you don't need to
+ * worry too much about inadvertently creating overlapping partitions, etc.
  */
 static void
 snap_to_boundaries (PedGeometry* new_geom, PedGeometry* old_geom,
@@ -401,7 +401,7 @@ snap_to_boundaries (PedGeometry* new_geom, PedGeometry* old_geom,
         adjacent = (start_part->geom.end + 1 == end_part->geom.start);
 
         /* If we can snap to old_geom, then we will... */
-        /* and this will enforce the snapped positions  */
+        /* and this will enforce the snapped positions */
         if (old_geom) {
                 if (snap (&start, old_geom->start, start_range))
                         start_allow = MOVE_STILL;
@@ -573,7 +573,7 @@ error:
         return 0;
 }
 
-/* Strip blanks from the end of string STR, in place.  */
+/* Strip blanks from the end of string STR, in place. */
 void _strip_trailing_spaces(char *str)
 {
         if (!str)
@@ -590,7 +590,7 @@ _is_unit_IEC(const PedUnit unit) {
            (unit == PED_UNIT_GIBIBYTE) || (unit == PED_UNIT_TEBIBYTE);
 }
 
-/* Return true, if str ends with IEC units.  */
+/* Return true, if str ends with IEC units. */
 static bool
 _string_ends_with_iec_unit(const char *str)
 {
@@ -701,7 +701,7 @@ do_mkpart (PedDevice** dev, PedDisk** diskp)
            mkpart primary any-name xfs 4096s 5000s
            requires the name, yet always fails, saying that only
            logical partitions may have names.
-           If you want a name, use parted's separate "name" command.  */
+           If you want a name, use parted's separate "name" command. */
 
         if (ped_disk_type_check_feature (disk->type,
                                          PED_DISK_TYPE_PARTITION_NAME)
@@ -1305,11 +1305,11 @@ do_print (PedDevice** dev, PedDisk** diskp)
                 if (!*diskp)
                         *diskp = ped_disk_new (*dev);
                 /* Returning NULL here is an indication of failure, when in
-                   script mode.  Otherwise (interactive mode) it may indicate
+                   script mode. Otherwise (interactive mode) it may indicate
                    a real error, but it may also indicate that the user
-                   declined when asked to perform some operation.  FIXME:
+                   declined when asked to perform some operation. FIXME:
                    what this really needs is an API change, but a reliable
-                   exit code is less important in interactive mode.  */
+                   exit code is less important in interactive mode. */
                 if (*diskp == NULL && opt_script_mode)
                         ok = 0;
         }
@@ -1659,7 +1659,7 @@ _disk_get_part_type_for_sector (PedDisk* disk, PedSector sector)
         return PED_PARTITION_LOGICAL;
 }
 
-/* This function checks if "part" contains a file system, and returs
+/* This function checks if "part" contains a file system, and returns
  *      0 if either no file system was found, or the user declined to add it.
  *      1 if a file system was found, and the user chose to add it.
  *      -1 if the user chose to cancel the entire search.
@@ -1723,7 +1723,7 @@ _rescue_add_partition (PedPartition* part)
 }
 
 /* hack: we only iterate through the start, since most (all) fs's have their
- * superblocks at the start.  We'll need to change this if we generalize
+ * superblocks at the start. We'll need to change this if we generalize
  * for RAID, or something...
  */
 static int
@@ -1983,9 +1983,9 @@ do_select (PedDevice** dev, PedDisk** diskp)
 }
 
 /* Return true if partition PART is consistent with DISK's selected
-   offset and alignment requirements.  Also return true if there is
+   offset and alignment requirements. Also return true if there is
    insufficient kernel support to determine DISK's alignment requirements.
-   Otherwise, return false.  A_TYPE selects whether to check for minimal
+   Otherwise, return false. A_TYPE selects whether to check for minimal
    or optimal alignment requirements.
 
    If align_err is not NULL a string describing why the check failed
@@ -2012,7 +2012,7 @@ partition_align_check (PedDisk const *disk, PedPartition const *part,
   bool ok = (part->geom.start % pa->grain_size == pa->offset);
 
   /* If it isn't aligned and the caller wants an explanation,
-     show them the math.  */
+     show them the math. */
   if (!ok && align_err) {
       if (asprintf(align_err,
                    "%llds %% %llds != %llds",
@@ -2059,7 +2059,7 @@ do_align_check (PedDevice **dev, PedDisk** diskp)
   free(align_err);
 
   /* Always return 1 in interactive mode, to be consistent
-     with the other modes.  */
+     with the other modes. */
   return 1;
 
 error:
@@ -2492,7 +2492,7 @@ for (walk = commands; *walk; walk++) {
 static void
 _init_i18n ()
 {
-/* intialize i18n */
+/* initialize i18n */
 #ifdef ENABLE_NLS
 setlocale(LC_ALL, "");
 bindtextdomain(PACKAGE, LOCALEDIR);
diff --git a/tests/gpt-attrs b/tests/gpt-attrs
index 0a01447..40aef9a 100755
--- a/tests/gpt-attrs
+++ b/tests/gpt-attrs
@@ -18,7 +18,7 @@ import sys
 
 class Gpt:
 
-    # Calculate and insert the CRCs of the partition entires and the
+    # Calculate and insert the CRCs of the partition entries and the
     # header.
     def calc_crcs(self, header, entries):
         # compute crc of partition entries
-- 
2.34.1




More information about the parted-devel mailing list