Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000005RapidDisk (rxdsk)[All Projects] rxadm administration utilitypublic2012-03-22 16:202012-03-23 09:32
Reporteradministrator 
Assigned Toadministrator 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
Platformi686OSDebianOS VersionSqueeze
Summary0000005: rxadm 2.0 unable to create, list, or do anything (when no volumes are listed in /dev/mapper)
DescriptionOriginally found by "mikeOverIP".

There is a bug in the below excerpt of the cmd.c file where if there is no entry (not a single entry) in the /dev/mapper directory path, we exit out of the application. This should be modified.

--------------------------------
struct RxC_PROFILE *
search_cache(void){
    int num, num2, num3, n = 0, i, z;
    struct dirent **list, **nodes, **maps;
    unsigned char file[NAMELEN] = {0};
    struct RxC_PROFILE *prof;
 
    memset(&prof, 0x0, sizeof(struct RxC_PROFILE));
 
    if((num = scandir(dev_mapper, &list, NULL, NULL)) < 0){
        if(ENOENT){
            printf("There are no listed cache devices.\n\n");
            exit(0);
        }else{
            printf("%s: scandir: %s\n", __func__, strerror(errno));
            exit(num);
        }
    }
--------------------------------
Change to something like this:
--------------------------------
        if(ENOENT){
            return NULL;
        }else{
--------------------------------
Steps To ReproduceInvoke the rxadm utility to attach or list device without any nodes listed in /dev/mapper (i.e. no device mapper enabled volumes)
TagsNo tags attached.
Attached Filestxt file icon rapidDiskInst.txt [^] (2,662 bytes) 2012-03-22 16:22 [Show Content]

- Relationships

-  Notes
(0000014)
administrator (administrator)
2012-03-22 18:56

Ended up returning NULL if no entry found.
(0000015)
administrator (administrator)
2012-03-22 18:58

Closing bug as Fixed in 2.0.1.

- Issue History
Date Modified Username Field Change
2012-03-22 16:20 administrator New Issue
2012-03-22 16:20 administrator Status new => assigned
2012-03-22 16:20 administrator Assigned To => administrator
2012-03-22 16:21 administrator Description Updated View Revisions
2012-03-22 16:22 administrator File Added: rapidDiskInst.txt
2012-03-22 16:38 administrator Description Updated View Revisions
2012-03-22 18:56 administrator Note Added: 0000014
2012-03-22 18:56 administrator Status assigned => resolved
2012-03-22 18:56 administrator Resolution open => fixed
2012-03-22 18:56 administrator Status resolved => assigned
2012-03-22 18:57 administrator Description Updated View Revisions
2012-03-22 18:58 administrator Note Added: 0000015
2012-03-22 18:58 administrator Status assigned => closed
2012-03-23 09:32 administrator Summary rxadm unable to create, list, or do anything (when no volumes are listed in /dev/mapper) => rxadm 2.0 unable to create, list, or do anything (when no volumes are listed in /dev/mapper)


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker