Lines Matching defs:dev
103 "partition (e.g. /dev/hda, not /dev/hda1)? This error might also occur\n"
604 if (!freopen("/dev/null", "w", stderr))
605 perr_exit("Failed to redirect stderr to /dev/null");
1822 static int read_all(struct ntfs_device *dev, void *buf, int count)
1829 if (!NDevReadOnly(dev))
1830 i = dev->d_ops->read(dev, buf, count);
1844 static int write_all(struct ntfs_device *dev, void *buf, int count)
1851 if (!NDevReadOnly(dev))
1852 i = dev->d_ops->write(dev, buf, count);
1876 // if (v->dev->d_ops->sync(v->dev) == -1)
1888 if (vol->dev->d_ops->seek(vol->dev, pos, SEEK_SET) == (off_t)-1)
1906 if (read_all(vol->dev, buff, vol->cluster_size) == -1) {
1915 if (write_all(vol->dev, buff, vol->cluster_size) == -1) {
2222 // if (vol->dev->d_ops->sync(vol->dev) == -1)
2233 && (ntfs_mst_pwrite(vol->dev, pos, 1,
2702 && (ntfs_mst_pwrite(vol->dev, pos, 1,
2761 if (vol->dev->d_ops->seek(vol->dev, 0, SEEK_SET) == (off_t)-1)
2764 if (vol->dev->d_ops->read(vol->dev, bs, bs_size) == -1)
2805 if (vol->dev->d_ops->seek(vol->dev, 0, SEEK_SET) == (off_t)-1)
2809 if (vol->dev->d_ops->write(vol->dev, bs, bs_size) == -1)
2821 if (vol->dev->d_ops->seek(vol->dev, opt.bytes
2824 if (vol->dev->d_ops->write(vol->dev, bs, bs_size) == -1)
2996 if (vol->dev->d_ops->sync(vol->dev) == -1)
3001 if (vol->dev->d_ops->sync(vol->dev) == -1)
3172 got = ntfs_mst_pread(vol->dev, pos, 1, vol->mft_record_size, mrec);
3207 got = ntfs_mst_pread(vol->dev, pos, 1, vol->mft_record_size, mrec);
3274 ok = !read_all(vol->dev, expand->mft_bitmap
3483 got = ntfs_pread(expand->vol->dev, expand->byte_increment,
3646 bw = ntfs_pwrite(vol->dev,
3686 bw = ntfs_pwrite(vol->dev, expand->boot_size,
3729 if (ntfs_mst_pread(vol->dev, pos, 1, vol->mft_record_size,
3742 && (ntfs_mst_pwrite(vol->dev, pos, 1,
3804 if (!read_all(vol->dev, buf, vol->cluster_size)) {
3809 && write_all(vol->dev, buf, vol->cluster_size)) {
4222 if ((ntfs_mst_pread(vol->dev, pos, 1,
4259 && (ntfs_mst_pwrite(vol->dev, pos, 1,
4296 got = ntfs_mst_pread(vol->dev, pos, 1,
4307 && (ntfs_mst_pwrite(vol->dev, pos, 1,
4349 static ntfs_volume *get_volume_data(expand_t *expand, struct ntfs_device *dev,
4363 vol->dev = dev;
4364 br = ntfs_pread(dev, expand->new_sectors*sector_size,
4405 struct ntfs_device *dev;
4439 dev = vol->dev;
4450 if (dev->d_ops->sync(dev) == -1) {
4491 struct ntfs_device *dev;
4496 dev = ntfs_device_alloc(opt.volume, 0, &ntfs_device_default_io_ops,
4498 if (dev) {
4499 if (!(*dev->d_ops->open)(dev,
4501 sector_size = ntfs_device_sector_size_get(dev);
4504 new_sectors = ntfs_device_size_get(dev,
4508 new_sectors = ntfs_device_size_get(dev,
4512 new_sectors = ntfs_device_size_get(dev,
4519 vol = get_volume_data(&expand,dev,sector_size);
4525 (*dev->d_ops->close)(dev);
4529 ntfs_device_free(dev);
4582 device_size = ntfs_device_size_get(vol->dev, vol->sector_size);
4682 if (vol->dev->d_ops->sync(vol->dev) == -1)
4685 printf("Successfully resized NTFS on device '%s'.\n", vol->dev->d_name);