Overview
Comment: | More work towards a writable solution |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | tcl-ops |
Files: | files | file ages | folders |
SHA1: |
1adf504f9a4e6eb2cc3b4657d6bb9fe8 |
User & Date: | rkeene on 2014-11-09 09:04:33 |
Other Links: | branch diff | manifest | tags |
Context
2014-11-09
| ||
09:10 | Removed spurious deletes and fixed permissions on version directory check-in: 7d728e1078 user: rkeene tags: tcl-ops | |
09:04 | More work towards a writable solution check-in: 1adf504f9a user: rkeene tags: tcl-ops | |
08:01 | Added a truncate action check-in: 8ea4ed266f user: rkeene tags: tcl-ops | |
Changes
Modified appfsd.c from [6a9a58fb18] to [070b2bd8e3].
︙ | |||
814 815 816 817 818 819 820 821 822 823 824 825 826 827 | 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 | + + | return(write_ret); } static int appfs_fuse_mknod(const char *path, mode_t mode, dev_t device) { char *real_path; int mknod_ret; APPFS_DEBUG("Enter (path = %s, ...)", path); if ((mode & S_IFCHR) == S_IFCHR) { return(-EPERM); } if ((mode & S_IFBLK) == S_IFBLK) { return(-EPERM); } |
︙ | |||
842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 | 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 | + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | return(0); } static int appfs_fuse_create(const char *path, mode_t mode, struct fuse_file_info *fi) { int fd; int chmod_ret; APPFS_DEBUG("Enter (path = %s, ...)", path); fd = appfs_fuse_open(path, fi); if (fd < 0) { return(fd); } chmod_ret = fchmod(fd, mode); if (chmod_ret != 0) { close(fd); return(-EIO); } return(fd); } static int appfs_fuse_truncate(const char *path, off_t size) { char *real_path; int truncate_ret; APPFS_DEBUG("Enter (path = %s, ...)", path); real_path = appfs_localpath(path); if (real_path == NULL) { return(-EIO); } truncate_ret = truncate(real_path, size); free(real_path); if (truncate_ret != 0) { return(errno * -1); } |
︙ | |||
972 973 974 975 976 977 978 979 980 981 982 983 984 985 | 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 | + + + | .open = appfs_fuse_open, .release = appfs_fuse_close, .read = appfs_fuse_read, .write = appfs_fuse_write, .mknod = appfs_fuse_mknod, .create = appfs_fuse_create, .truncate = appfs_fuse_truncate, .unlink = appfs_fuse_unlink_rmdir, .rmdir = appfs_fuse_unlink_rmdir, .mkdir = appfs_fuse_mkdir, }; /* * FUSE option parsing callback */ static int appfs_fuse_opt_cb(void *data, const char *arg, int key, struct fuse_args *outargs) { static int seen_cachedir = 0; |
︙ |
Modified appfsd.tcl from [3cd77a5342] to [d0837729e0].
︙ | |||
457 458 459 460 461 462 463 464 465 466 467 468 469 470 | 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | + + + + + + + + + | if {[info exists pathinfo(package)] && [info exists pathinfo(hostname)] && [info exists pathinfo(file)]} { set dir [_localpath $pathinfo(package) $pathinfo(hostname) $pathinfo(file)] foreach file [glob -nocomplain -tails -directory $dir -types {d f l} {{.,}*}] { if {$file == "." || $file == ".."} { continue } if {[string match "*.APPFS.WHITEOUT" $file]} { set remove [string range $file 0 end-15] set idx [lsearch -exact $retval $remove] if {$idx != -1} { set retval [lreplace $retval $idx $idx] } continue } if {[lsearch -exact $retval $file] != -1} { continue } lappend retval $file } |
︙ | |||
527 528 529 530 531 532 533 | 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 | - + - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | if {[info exists pathinfo(package_sha1)] && $pathinfo(package_sha1) != ""} { set retval(type) directory set retval(childcount) 2; } } } "files" { |
︙ | |||
586 587 588 589 590 591 592 | 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 | + + - + - + | if {$pathinfo(_type) != "files"} { return -code error "invalid type" } set localpath [_localpath $pathinfo(package) $pathinfo(hostname) $pathinfo(file)] if {$mode == "create"} { file delete -- "${localpath}.APPFS.WHITEOUT" |
︙ | |||
665 666 667 668 669 670 671 | 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 | - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | set dirname [file dirname $filename] file mkdir $dirname return $filename } |