[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parted 1.6.5-pre1

From: Veerapuram Varadhan
Subject: Re: Parted 1.6.5-pre1
Date: Mon, 6 Jan 2003 15:10:34 +0530 (IST)

Hi Andrew,

libparted 1.6.5.pre1 is so far so good for those RAID related changes. 
However,  i have doubt related to the following code fragment of

------- CODE FRAGMENT STARTS --------------------------
        /* exclude directory names from test */
        pos = strrchr(name, '/') ?: name;

        /* states:                                                        
                          *      0       non-digits               
                                                   *      1      
          *      2       non-digits                               
                                   *      3       digits          
        /*==============> pos++;  <===============*/

        for (state = 0; state < 4; state++) {
                int want_digits = (state % 2 == 1);
                do {
                        if (!*pos)
                                return 0;
                        if (!_compare_digit_state (*pos, want_digits))
                                return 0;
                } while (_compare_digit_state (*pos, want_digits));
-------------------CODE FRAGMENT ENDS------------------

Suppose if my /proc/partition has entry like rd/c0d0, according to the
above code, the pattern string pointed by the variable "pos" will be
"/c0d0", as strrchr returns pointer to the character that it matches in
the string from reverse, which, i feel, may be logically wrong, though the
code works/will work fine as it uses "isdigit" for the pattern matching.

How about adding that line marked by /*========> pos++; <==========*/?


I need one more clarification.  In my /dev/rd directory, i found only 7
device nodes for c0d0 starting from c0d0p1 to c0d0p7.  Why is it so?  Is
it a kernel limitation?

I created 8 partitions using parted.  Parted is able to show all the 8
partitions including c0d0p8, but the entry corresponding to this partition
was not found in the /proc/partitions.  Can anybody throw some light on
this, as to how to solve this?



V. Varadhan.

> Hi all,
> Changes:
> * libparted/linux.c (_match_rd_device, _compare_digit_state,
>   _probe_proc_partitions): added, added and modified respectively to
> match raid devices looking like /dev/rd/c0d0, which are not
> partitions.
> * libparted/disk_dvh.c, libparted/Makefile.am, libparted/libparted.c:
>   renamed from everything from mips to dvh, including the file name
> libparted/disk_mips.c.
> * applied updated translations: de
> Cheers,
> Andrew
> _______________________________________________
> Bug-parted mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-parted

Veerapuram Varadhan,
Systems Engineer,
CDC Linux,
Bangalore - 68.
Ph- (080)-5502999

reply via email to

[Prev in Thread] Current Thread [Next in Thread]