Imported Upstream version 0.6.3
[platform/upstream/multipath-tools.git] / kpartx / dasd.c
index 14c35b1..faf5e2e 100644 (file)
@@ -19,9 +19,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 #include <stdio.h>
@@ -65,7 +63,7 @@ typedef unsigned int __attribute__((__may_alias__)) label_ints_t;
 
 /*
  */
-int 
+int
 read_dasd_pt(int fd, struct slice all, struct slice *sp, int ns)
 {
        int retval = -1;
@@ -114,7 +112,7 @@ read_dasd_pt(int fd, struct slice all, struct slice *sp, int ns)
                 * major/minor into an openable device file, so we have
                 * to create one for ourselves.
                 */
-               
+
                sprintf(pathname, "/dev/.kpartx-node-%u-%u",
                        (unsigned int)major(dev), (unsigned int)minor(dev));
                if ((fd_dasd = open(pathname, O_RDONLY)) == -1) {
@@ -235,7 +233,7 @@ read_dasd_pt(int fd, struct slice all, struct slice *sp, int ns)
                            || EBCtoASC[f1.DS1FMTID] == '5'
                            || EBCtoASC[f1.DS1FMTID] == '7'
                            || EBCtoASC[f1.DS1FMTID] == '9') {
-                               blk++;
+                               blk++;
                                continue;
                        }
 
@@ -245,7 +243,7 @@ read_dasd_pt(int fd, struct slice all, struct slice *sp, int ns)
                                break;
 
                        /* OK, we got valid partition data */
-                       offset = cchh2blk(&f1.DS1EXT1.llimit, &geo);
+                       offset = cchh2blk(&f1.DS1EXT1.llimit, &geo);
                        size  = cchh2blk(&f1.DS1EXT1.ulimit, &geo) -
                                offset + geo.sectors;
                        sp[counter].start = sectors512(offset, blocksize);
@@ -282,7 +280,7 @@ read_dasd_pt(int fd, struct slice all, struct slice *sp, int ns)
                retval = 1;
        }
 
- out:
+out:
        if (data != NULL)
                free(data);
        if (fd_dasd != -1 && fd_dasd != fd)